Skip to content

Tag: openlayers

Convert bbox coordinates to geoJSON

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 libra…

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. Ho…

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 s…

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 transpa…