Questions tagged [openlayers-6]

v6 specific questions on the OpenLayers mapping library

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

412 questions
0
votes
0 answers

Does draw geometryFunction still work in openlayers 6?

I try to use geometryFunction to get and put the coordinate in some html table. so I use this example (for OL3) jsfiddle by Jonatas Walker var draw = new ol.interaction.Draw({ source: vectorSource, type: "LineString", geometryFunction:…
jipexu
  • 3
  • 5
0
votes
0 answers

Openlayers popup in React doesn't follow the map zoom

I'm trying to code a modified version of this example. Using vanilla Javascript all is working fine, but now I'm trying to move it to React and the popup doesn't follow the map when I zoom in or zoom out the map. I suppose that the popup is not…
Accollativo
  • 1,537
  • 4
  • 32
  • 56
0
votes
1 answer

Multiple labels for an object in OpenLayers

Questions How can one achieve the desired result described below using the OpenLayers6 library without rendering the object multiple times? If 1 is not possible what is a suitable method for achieving this result (custom library…
nstillwell
  • 51
  • 7
0
votes
1 answer

Angular rerenders when user hovers over Openlayers map

I am using Openlayers 6 in my project alongside Angular 8. And up until now i noticed that whenever i hover over Openlayers map, Angular component, where the map is located, gets re-rendered. My question is how do i make parent component stop…
0
votes
1 answer

What do I replace PointerEvent in OpenLayers 5 with in OL 6?

Trying to upgrade from OL5.3 to OL6.1 but not sure how to fix this yet. https://github.com/openlayers/openlayers/blob/master/changelog/upgrade-notes.md#olinteractionmodifyevent-changes That covers the renaming of MapBrowserPointerEvent import…
Stephen Woodbridge
  • 1,100
  • 1
  • 8
  • 16
0
votes
1 answer

Openlayers markers offset (not at the right place)

I am using a Web Features Service (WFS) and I want to display a marker on a OpenLayers map. Extract of WFS's response :
0
votes
0 answers

OpenLayers: Zoom level changes to non-round number after OL6 upgrade

We upgraded from OL5.3 to OL6.1.1 recently and I noticed that OL handles the zoom level somehow differently. Previously, the zoom level would always be a whole number, even after rotating the map or using the "zoom to layer" function; right after…
Stuart
  • 41
  • 3
0
votes
1 answer

How to set spider view marker on marker click in open layer map?

I have create open layer map and set markers in map using some dynamic latitude and longitude some latitude and longitude value are same so how open spider view when click on marker let path = this.props.waypts; path.map((lat,index)=>{ …
0
votes
1 answer

Open layers 6.1. - popup with multiple points features

I have a problem in my open layer (6.1.) project with a popup bubble. I am not able to create and see the popup and fill it, not even with a single GeoJSON layer with cities. I read this without progress: popup with multiple points features I…
Pedro Proxy
  • 3
  • 1
  • 3
0
votes
1 answer

OpenLayers6 Detect when cursor leaves map

I want to hide a circle that is attached to the cursor when the cursor leaves the map. This circle must also hide when the cursor enters a ol.control. In older OL versions I simply added a mouseleave listener to the canvas object, but in OL6 it is…
anste
  • 118
  • 1
  • 3
  • 11
0
votes
1 answer

WMS Layer of new internal tile coordinates and custom tilegrid in ol 6

My default map is in EPSG: 5179 coordinate system, and I'm using tileurlfunction with redefinition. The view projection is also set to 5179. Projection of Geoserver WMS layers to EPSG: 4326 or EPSG: 3857 On request it will overlay on my base…
Chad.K
  • 65
  • 1
  • 5
0
votes
2 answers

OpenLayers 6 on Rails target.addEventListener is not a function

i start from the scratch to build a Rails 6 Application with Openlayers 6.1.1. with Webpacker and Turbolinks. Many things are working fine, also with turbolinks. But one thing will not work fine: Openlayers. I add openlayers with yarn an it is…
MarcoK
  • 11
  • 6
0
votes
2 answers

can' t display a vector layer using openlayer 6

I am working on an openlayers map to add a vector layer with the source of the local geojson and gpx file in a Vuejs project, but the vector layer cannot be displayed. I tested outside of Vue.js and I have the same problem. Voici le code : //…
sandrine
  • 43
  • 7
0
votes
1 answer

How to create flying animations between two distant polygons in OpenLayers

Using Openlayers (v6.1.1.) I'm trying to create simple FlyTo animation between several polygons. FlyTo animation works fine when there is somehow small distance between them but with increase in distance there is decrease in user experience. On…
Svinjica
  • 2,389
  • 2
  • 37
  • 66
0
votes
1 answer

Openlayers 6 - How can I select vector layer from drop down menu

On my map, I have an OpenStreetMap tiles in the background and a VectorLayer on top. Now I want VectorLayer to be changed by user via drop down menu. How can I achieve this? Here's my HTML drop down menu code: