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

Make Icon change position to mouse click spot in Open Layers 6

How do you make it so wherever you click on the map, the Icon added on the map just instantly teleports to those coordinates? Currently in the official Open Layers 6 'Examples' page, it shows the drag and drop example with the following…
Mr.Coder
  • 347
  • 1
  • 10
-1
votes
1 answer

openlayers 6 Vue 2.. Prevent doubleclick zoom on map

I am building an interactive map function using Vue2 and openlayers6. As part of the functionality for this I want to repurpose the doubleClick to interact with vector layer underneath the mouse, however the first thing I need to do is stop the…
Aaron Reese
  • 544
  • 6
  • 18
-1
votes
1 answer

method to update the javascript code and functions from openlayers 4.4 to 6

I used openlayers 4.4 to create a web mapping interface. Is there a special method to update the code and functions to be compatible with versions 6 ?
ericire
  • 409
  • 6
  • 22
-1
votes
1 answer

How to access child feature from an array of features in openlayers

I have this code below: evt.target.forEachFeatureAtPixel( evt.pixel, (feature, layer) => { }); when I click on a feature it returns me array of features like features: Array(1) 0: Feature {disposed: false, eventTarget_: undefined,…
user10496245
  • 217
  • 3
  • 17
-1
votes
1 answer

Unable to show a pop-up in the middle of a control code execution in Chrome

I would like to show a pop-up while executing code in a control, but the pop-up only appears at the end of the execution (so when control is handed over to the map again?) In Firefox, this works as expected, but not in Chrome or…
lindea
  • 1
  • 3
-1
votes
1 answer

openlayer markers with text, something strange about the level

sandcode: https://codesandbox.io/s/icon-color-forked-v7chj?file=/main.js I use markers with icon style and text style, but I found something strange. When I added two markers with icon and text style, it seemed like I added two layers which are a…
sharryliao
  • 13
  • 2
-1
votes
1 answer

Set different icons to openLayers vector

i need some help to set icons to vectors in my map. I mean when map loads it shows different icons depending of property "station" in GeoJson. Using "for" I've got the name station and set a variable to store the path to get the icon. In console it…
-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

How to convert Openlayers 6.5 Mouse position control from LonLat to MGRS?

im using this control var mousePositionControl = new ol.control.MousePosition({ coordinateFormat: ol.coordinate.createStringXY(2), projection: 'EPSG:4326', undefinedHTML: ' ' });
Muayd
  • 15
  • 3
-1
votes
1 answer

Is there a way to save OpenLayers features to another file?

I am utilizing two maps, one is where someone could add or remove features (admin file) and another that the end-users would see (user file). However, I have no way to save the features I added in my admin file upon refreshing in my browser. I…
Enic1938
  • 1
  • 1
-1
votes
1 answer

OS Data Hub - Postcode from Grid Reference

I look after the website for a walking club in SW England, which shows a list of forthcoming walks. Each walk entry has an OS Grid Reference for the start of the walk, and a UK Postcode which a walker can enter to their SatNav device, to help them…
-1
votes
1 answer

Openlayers 6 geolocation control

I'm reworking the geolocation control feature from this Openlayers workshop, but I can't figure out what I'm doing wrong. I'm getting the error message: Uncaught TypeError: Cannot read property 'getExtent'. It should be pointed to the right source…
-1
votes
1 answer

OS Data Hub not working on iPad or iPhone

I look after a website which displays UK Ordnance Survey maps for people going on walks in SW England, and it relies on displaying a marker on an OS map, in response either to an alphanumeric OSGB grid reference, appended as a query string to the…
-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
3 answers

How to convert Lon Lat to Geomtry in Openlayers?

Now. I had Lon Lat. I want convert Lon Lat to Geomtry in Openlayers. But i don't know. Ex my problem: I want convert 106.62639994087715 11.00448399644145 [LON LAT] to 0101000020E61000002812C7EF16A85A409024F4B94B022640[GEOMTRY] Please help me. Tks…
1 2 3
27
28