Hello I have a array of coordinates that look something like this: [14.540536348680394,65.03068471588048,18.945463651319603,66.82731528411952] I need to properly display it on my openlayers map but it seems like I must convert the bbox to a valid geoJSON object first. Is there a fuction I can write or a library that can do this for me? Or is there any work arounds
Tag: openlayers
Viewport affecting relative position of a nested element in resizable div
In this app I made, where I use Vue and OpenLayers to create animations, a img element with position: relative is placed at the top right corner of a canvas element with resize: both; overflow: auto;. The problem (CodePen) is said element is used to create an animation in a for loop where at each iteration the canvas element is
Openlayers 6 – Show Geojson Label on polygon
please i’m working on openlayers and i can’t use attribute value as label for my GeoJSON vector file. I want to show the text from properties “osmid” in my GeoJSON file as label. here is my code My Geojson file looks like this : Answer You need to use a style function where you set the text in the style
Openlayers delete element option by mouse rightclick
I would like to enable the delete option after right-clicking on my object. So far, the code I provided doesn’t work, because the browser is checking some devices for me, as you can see below: My code looks like this: I would like to have an option to delete the selected object after the right-click. How can I do it?
Different layer styles affecting each other openlayers
I want to draw dashed line and straight line by using open layers Draw method. In this method there is a LineString option for drawing straight line but I cound not find a option for dashed line. So my aim is to style LineString and make a dashed line. But the problem is, this approach is also affecting the straight
Openlayers map implemented in react does not work on mobile
I have an implementation of the OpenLayers map in react which looks like this: The map works very well on the pc browser, the map can be dragged, zoomed-in / zoomed out without any problems. The markers are displayed properly and so on. The issue is that it is not responding to any touch event on mobile. So it cannot
Filter features with properties in OpenLayers
I’d like to filter features on the map using the feature properties. For example if I have this property in the geojson: And I want to see only featuers with Start > 10, how can I implement that features with Start < 10 are hidden? If I change the style with following code the features are transparent but they are
Display Multiple Markers on OpenLayers 5 dynamically with Pop-up window
I am trying to display two Markers on the Map which i already saved in an array. I want the Markers to be dynamically displayed and with a Pop-up window for each one. here is the code i wrote and edited from my Last question. I get nothing displayed on the Map, can somebody fix the problem?, I have tried
Openlayers 4 Adding Animation Pause/Continue Functionality?
I am using open layers 4. I am moving and stoping marker animation as this example without any problem. But I want to add pause and continue functionality to marker also. I edit some variables and endeavor on the issue with these functions. When I call continueAnimation function at first, the elapsedTime parameter become negative and give exception on moveFeature
How to show zoom level on openlayers (js/html file only)?
looking for some help on this. I know it is something along the lines of Looking to add a div for the zoom status also: or what would be the best approach? If someone could offer some insight, it would be appreciated. Couldn’t find the answer in the documentation. Answer I don’t believe in the current version of openlayers that