Questions tagged [openlayers-5]

v5 specific questions on the OpenLayers mapping library

OpenLayers v5 is the latest release of the OpenLayers mapping library.

From https://openlayers.org/:

OpenLayers makes it easy to put a dynamic map in any web page. It can display map tiles, vector data and markers loaded from any source. OpenLayers has been developed to further the use of geographic information of all kinds. It is completely free, Open Source JavaScript, released under the 2-clause BSD License (also known as the FreeBSD).

v5 reworked the library as a set of ES Modules, and improved compatibility with mainstream module bundlers.

317 questions
0
votes
1 answer

OpenLayers 5 - Click is a little bit displaced

I worry about some problems in my map. The click-Event is working normally, but it is a little bit displaced to the right, which means if i click a little bit left of a feature (maybe 6 pixels or something), it selects the feature, but I actually…
0
votes
1 answer

OpenLayers5: hitTolerance doesn't seem to work with WMS layer

I am new to OpenLayers as I just today tried porting over my map from Leaflet to OL since hitTolerance is exactly what I was looking for. Also, I understand v5 is quite new, so the docs are not completely updated in my experience. I can't seem to…
ernie
  • 350
  • 2
  • 10
-1
votes
1 answer

How to get the polygon coordinates from an open layers map using react

I'm trying to get the coordinate points from a drawn polygon in an Open layers map using react. I'm having 2 problems I cannot subscribed to the drawend cause when I do the function that I want trigger on that even does not gets trigered. When I…
intercoder
  • 2,171
  • 7
  • 23
  • 34
-1
votes
1 answer

How to close Polygon during drawing OpenLayers?

I use Draw obejct to draw default polygon. It gives the following result: polygon drawing OpenLayers As you can see, the polygon is not closed. How to close it during drawing like it works after complete drawing? Maybe dont close, but draw the last…
-1
votes
2 answers

How to make a Specific polygon not get modified when user try to modified on basis of properties in open layer 6?

when i render my geojson. i want user should not able to modified the polygon having property region key name- Serviceable. Other objects in the feature array user can modify on the map expect the feature object having region key value …
-1
votes
1 answer

Openlayers : dynamically add vector to existing feature

I create a feature from a gpx file : var gpxFeatures = (new OlFormat.GPX()).readFeatures(GPXSTRING,{ dataProjection:'EPSG:4326', featureProjection:'EPSG:3857' }); Now I wish to dynamically add a vector to…
-1
votes
1 answer

Openlayers 6.3.1 ajax white page

When i load openlayers 5 or 6 over ajax ( $.ajax('/url/', function(data){ $('.content').html(data); }); ) html+js then map area is blank. If i debug over ajax then ol-unselectable div is hidden when i hit F12 button then it appears visible all…
user2573099
  • 63
  • 1
  • 6
-1
votes
1 answer

Get features inside a polygon from a WMS Layer in OpenLayers

I currently implemented this example. So I can select layer's features with a single click or box selection. But I want to know is it possible to get features with box selection on a wms layer? (i tried with vector layer and it's currently…
sep7696
  • 494
  • 2
  • 16
-1
votes
1 answer

KML with image that from source that does not have Access_Control_Allow_Origin header

i'm using openlayers and trying to show a KML inside my map on a web application hosted by IIS. An example of the KML i'm using is: Test…
Phil
  • 1,852
  • 2
  • 28
  • 55
-1
votes
1 answer

Clustering markers async data at openlayers 5 angular

I see markers on my local project when I use mock data, but unfortunately I can't see them when I get data from the backend. The exception is when i get one marker from backend, then he appears on the map. I send feature from marker-component do…
gomez119
  • 11
  • 2
-1
votes
1 answer

Open Layers 5.3.0 project, problem with Point customization

I'm learning openstreetmaps and openlayers. I started with application approach (Parcel + openlayers). Most of examples you find here, that could possibly help me are used with older code, which as I understand does not support all features such as…
NIck
  • 67
  • 13
-1
votes
1 answer

How to use a different graphic for a marker

I am showing different layers to show points on a map, see https://www.corobori.com/sos/TestMap3.html. My customer would like to see a more traditional marker. Below is my code showing the blue circle var layer1 = new ol.layer.Vector ( …
Corobori
  • 303
  • 3
  • 13
-1
votes
1 answer

open layer not getting accurate area by geojson

I am Trying to set polygons by using json object but my polyons places on different location on map. I am using openlayers for a first time. I referred some examples on open layers docs but none will solve my issue. I am attaching some screen shots…
-1
votes
1 answer

UI is getting blocked when zooming in/out with markers in openlayers integration

I have integrated openlayers in my angularJs/Typescript project with bing map to develop ms dynamics crm client-side application. I am using this application as offline-html in field service mobile crm. I have about 5k records as markers on the map…
user10496245
  • 217
  • 3
  • 17
-1
votes
1 answer

Why is adding Openlayers v5 to Angular (6) making the SPA download much larger?

Openlayers is a very nice package for working with maps. My Spring Boot, Angular and Leaflet SPA has a vendor.js file of 4.2Mb. Replacing Leaflet by Openlayers 5 gives a vendor.js of 6.8Mb. Noticed differently: adding Openlayers to a bare Angular…
tm1701
  • 7,307
  • 17
  • 79
  • 168