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
1 answer

Openlayers 6 - Show Geojson Label on line

I am confused about how to put a label in GeoJSON file to show on the map. I've tried many of examples from openlayers.org but they won't work. I want to show the text from properties "name" in my GeoJSON file on top of the map and along the line,…
0
votes
1 answer

How to get distance from a circle in OL6

How to get distance from draw circle feature,? const radius = feature.getGeometry().getRadius(); The radius can be obtained. (Is this pixel?) want a meter. thanks.
Yamada JP
  • 73
  • 1
  • 2
  • 6
0
votes
1 answer

OpenLayers 6: Forcibly Select Polygon

I've implemented OpenLayers 6 with a Select interaction and a Draw interaction, which I toggle between. We can assume that the user is only drawing polygons (geometry of three points or more). I want the polygon drawn to be selected once it is…
WebWanderer
  • 10,380
  • 3
  • 32
  • 51
0
votes
0 answers

How to add on rotation and zoom listener on OpenLayers 6?

Im trying to handle Rotation and Zoom interactions. Is it possible to create one listener for all interactions created by DragRotateAndZoom? https://openlayers.org/en/latest/apidoc/module-ol_interaction_DragRotateAndZoom-DragRotateAndZoom.html ... …
N33D
  • 135
  • 1
  • 7
0
votes
1 answer

How to cache Styles but still set individual text?

I'm lost with the following Situation. I'm using OpenLayers 6 in an Android Application. I have around 4000 geoJson Features to display. It's just one vector layer with 4000 Features. For 3000 of them, I have to set an individual text (all of them…
BR75
  • 633
  • 7
  • 25
0
votes
1 answer

Angular8 and OpenLayers 6: ERROR TypeError: Cannot read property 'forEachFeatureAtPixel' of undefined

I am trying to open popup whenever I click on a feature. I've managed to get onclick event on map, but when I try to get the feature clicked I am getting the above below. I would appriciate any help, thanks. app.component.html
user5673373
0
votes
1 answer

Adding Arrows or Overlay animation in Flight Animation example in OpenLayers 6

I want to add moving arrows or overlay animation in the Flights Animation example in OpenLayers 6. I tried doing the overlay moving animation with JavaScript setInterval(), but so far I have only succeeded in animating a single LineString, that too…
0
votes
1 answer

OPENLAYERS 6 how to get the bounds of several kml file

How can i get the bounds of several kml file ? i can get easely for one kml file but i am a little be lost ... to get the bounds of all kml file who are in the map ... here is the code (write in php file context) at first i define the kml file…
jipexu
  • 3
  • 5
0
votes
1 answer

OpenLayers 6 - adding second vector tile layer causes base layer labels to disappear

I am using OpenLayers 6 to display two MVT tile sources as two layers. The base layer has an MVT source from a local service serving an OpenMapTiles mbtile file, using the osm-bright style supplied with the file. The second source is a MVT layer…
dr_jts
  • 211
  • 1
  • 5
-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

Openlayers Move geoMarker How to Ending

Openlayers In this case, it is possible to stop the movement not in the middle of the movement, but at the last point. https://openlayers.org/en/latest/examples/feature-move-animation.html
huifer
  • 3
  • 1
-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

(Uncaught ReferenceError: defaultInteractions is not defined) How Can I Add "Translate Features" To My Openlayers6 Project In Asp.Net Core5

I'm new to Openlayers. While I was using Node.js, my codes were working fine. But I ran into some problems when I switched to Asp.Net Core. I learned that when calling modules to use them in Asp.Net Core I need to add some prefixes to their…
görkem
  • 1
  • 1
-1
votes
2 answers

How To Draw Path Between Two Location Coordinates Using OSRM Routing Machine in OpenLayers?

How To Draw Path Between Two Location Coordinates Using OSRM Routing Machine in OpenLayers ?
-1
votes
1 answer

how to add point features to openlayer 6 map

I'm new to openlayers and am looking for a good tutorial for adding point features to a map. There are 900 points {name, lat,long,url} which represent retail stores and I need to be able to add each of them along with a colour that indicates the…
open768
  • 1
  • 2