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

Listen to Marker onClick at OpenLayer

I've the below marker defined, how can I do the following: - Adding onclick listener - Display a popup once the onclick listener is triggered var marker = new ol.Feature({ name: 'TRUCK TR1', population: 4000, rainfall: 500, …
Hasan A Yousef
  • 22,789
  • 24
  • 132
  • 203
0
votes
1 answer

Superpose two maps with different projections?

I am attempting to superpose two different maps, but I am unable to superpose them and I have no idea on how to fix this issue. let bottom_left = ol.proj.fromLonLat([5.009752942020352, 45.356001339311526]) let top_right =…
nowox
  • 25,978
  • 39
  • 143
  • 293
0
votes
1 answer

OpenLayers cannot style dragBox

I'm using Angular7/Typescript with OpenLayers 5 and I've added a DragBox from from 'ol/interaction'; mapValues.drawObj = new DragBox({ class: 'myDragBox' }); mapValues.map.addInteraction(mapValues.drawObj); I've added style to my scss…
Funn_Bobby
  • 647
  • 1
  • 20
  • 57
0
votes
1 answer

Can't Center Map with XYZ Tiles

I sliced an image into XYZ tiles using the gdal2tiles command-line tool. The map loads fine and all the expected tiles are in working order, however there are two problems (probably related): The {z}/{x}/{y} format is making a bunch of requests to…
Addison
  • 26
  • 2
0
votes
1 answer

Different types of Tiles in Open Layers

I am new to Open Layers and i stumbled upon different types of tiles which are: image tile, Tile, Vector, Vector Tile. I would really like to know the difference between these four. Also, would like to know which one of these are the faster for…
Ashim
  • 877
  • 2
  • 12
  • 22
0
votes
2 answers

Problem with Cesium integration in OpenLayers 5 - Cesium is not defined

One quick question regarding ol-Cesium. I'm trying to integrate ol-Cesium into my Vue - Openlayers app. But I'm getting this type of error: "ReferenceError: Cesium is not defined" Basically what I'm trying is to activate 3d functionality on click…
Svinjica
  • 2,389
  • 2
  • 37
  • 66
0
votes
1 answer

How to label the features in openlayers without using overlays

I am aware of adding overlays in openlayers and using them as tooltips for relaying some information, but we have to manage the things to get it done. Leaflet on the other hand has provided bindLabel() to display tooltips in the viewport of map. My…
capnam
  • 429
  • 9
  • 25
0
votes
2 answers

Get the Feature id openlayers5

In OL2 feature id's were generated internally. In OL5 this doesn't seem to be the case since the id's are undefined. Has the internal feature id been removed from OL5? If not what do I need to do to get the id's generated. I am requesting the id…
Wejden
  • 13
  • 3
0
votes
1 answer

How to get rid of the "blue dot" selection icons and make hovering over the whole picture allowed to move it

I have an openlayers map and a pin on the map. I would like to get rid of this blue dot, which shows up when you hover over the pin. There are many similar topics, but found guidelines did not bring me results. I would also like to be able to move…
Aneta
  • 78
  • 7
0
votes
1 answer

Problem with OSM Map OpenLayers 5 : the map won't show

The OSM map won't show anymore with Openlayers 5 I tried to added from ol.source.OSM() but a grey map shown. var map3 = new ol.Map({ layers: new ol.layer.Tile({ source: new ol.source.OSM() }) , target: 'map-id3', …
Wejden
  • 13
  • 3
0
votes
1 answer

OpenLayers not loading GeoJSON layer data

Please i want to display a layer from GeoJSON file with openlayers 5.3.0 but the result (the vectorLayer variable) show a blank page, only Tile layer is visible. What am i missing? When using this sample json, I can see the created point in map…
tfm
  • 63
  • 1
  • 7
0
votes
1 answer

show mousepointer in multiple maps (syncing mousepointer)

When I have my mousepointer in one map I need the mousepointer also visible in another map at the same time (and of course showing at the same position)........so syncing mousepointer between maps. How can I achieve that?
user1939338
  • 117
  • 9
0
votes
1 answer

OpenLayers 5 clicking on feature does not find it but clicking below the feature does

The map renders the features with the custom styles. Clicking on the map where the feature shows triggers the click event but the feature is not found. The feature is found if the map is clicked slightly below the displayed style. This also does not…
SabaS
  • 11
  • 3
0
votes
1 answer

Marker with icon and text

I am displaying marker with icon first in openlayers map and when zooming in certain zoom level text is showing as overlay below the icon but it doesn't work smoothly. Please find my code below: var distance = heatMap ? 14 : 40; this.ClusterSource =…
user10496245
  • 217
  • 3
  • 17
0
votes
1 answer

Draw great circle line on the map directly in OpenLayers 5?

Is it possible to draw the great circle line in the OpenLayers 5 directly, without splitting the LineString into many small parts like https://openlayers.org/en/latest/examples/flight-animation.html? Here is the problem of user experience related to…
pvii007
  • 3
  • 6