Questions tagged [openlayers-7]

v7 specific questions on the OpenLayers mapping library

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

42 questions
0
votes
0 answers

cross-origin read blocking (corb) blocked cross-origin error OpenLayers Offline Map with tileserver-gl-light server

I want to use offline Map for my openLayers project , I am using openLayers 7 and a mapTiler file mbtiles and TileServer GL light for serving my map , I use this code const raster = new TileLayer({ source: new XYZ({ url: …
0
votes
0 answers

How to zoom in extent with Postgis X/Y in openlayers v7

I have a problem to zoom the nearest possible from extent on a map with Postgis data. I have try to zoom from geometry but always land in an other location. In first place I call Postgis with this code …
0
votes
0 answers

change style of Draw and Modify Features openlayers

I was using Draw and Modify Features example of OpenLayers in the site https://openlayers.org/en/latest/examples/draw-and-modify-features.html I was wondering if I could draw features with different styles ? in other words I need to have two style…
0
votes
1 answer

How to change the color of my SVG marker in OpenLayers 7

I'm not even sure if this is possible but I am trying to change the color of a marker on an open layers 7 map. The marker is being added from an svg file using the following lines of code: const marker = new ol.Feature({ geometry: new…
user3182413
  • 59
  • 1
  • 7
0
votes
1 answer

Issue placing a marker in the correct spot on an OpenLayers 7 map

I am creating a webapp that allows user to create mulitple maps. On each map the user has the ability to add/remove a marker. They are then able to drag it into the appropriate location and/or change the size of the marker. For the most part the…
0
votes
0 answers

On openlayer, How to force load tiles for same resolution?

I saw an example of openlayer for preloading low resolution tiles (Preload.html) My code snippet for preload around tile is as follows; .... const myMap = new Map({ layers: [ new TileLayer({ preload: Infinity, source:
chunu
  • 1
0
votes
1 answer

How to change the src of a feature on an OpenLayers 7 map

I am trying to create a map using OpenLayers 7 that will allow the user to change the style of the marker being used. I can't seem to figure out how to change the src of the feature being used as my marker. I don't think there is a .setSrc() option…
user3182413
  • 59
  • 1
  • 7
0
votes
0 answers

Draw 2 or More Features with 1 Draw Interaction

Our application draws 3 geometries: centerLine, centerToEdgesLines, boundaryPolygon (in 1 geometry collection) Is it possible to use Openlayers Draw interaction (LineString) to draw 3 Features instead ? This is to make Modify interaction easier to…
Lydon Ch
  • 8,637
  • 20
  • 79
  • 132
0
votes
1 answer

Get openlayers map data live while user interacts with map

I'm creating a webapp using openlayers (version 7.2) and I'm trying to figure out how to have a live output of the current center, zoom & rotation. I have found the 'movestart' and 'moveend' events however these both fire only once either at the…
user3182413
  • 59
  • 1
  • 7
0
votes
1 answer

OpenLayers: Remove clusters on certain zoomlevel (even for same coordinates)

I am using OpenLayers 7 and I have a dataset which contains a lot of geojson features which I need to mark on the map. To get an okayish performance I need to cluster them when zoomed out. This works all alright, but the problem is that the dataset…
Merc
  • 4,241
  • 8
  • 52
  • 81
0
votes
1 answer

How can I have OpenLayers draw the shortest line between two coordinates

I am specifying the coordinates of [-122, 47], (in USA) [147, -32] (in Australia) The image it produces is: I was under the false impression that OpenLayers would draw the shortest line between two coordinates. What would I need to change so…
Eric G
  • 340
  • 1
  • 12
0
votes
0 answers

How can I use OpenLayers Swipe with VectorLayer

Currently I'm tasked with comparing Vector objects as they've changed over time based on the year a user selects. I've been using Open Layers Swipe as a guide https://openlayers.org/en/latest/examples/webgl-layer-swipe.html I just realized this is…
Funn_Bobby
  • 647
  • 1
  • 20
  • 57
0
votes
1 answer

flip OpenLayers WebGL swipe functionality

I'm currently using this example in my application https://openlayers.org/en/latest/examples/webgl-layer-swipe.html which overlays the left side of the map with a lay that you can extend over your base map. I need this exact functionality however…
Funn_Bobby
  • 647
  • 1
  • 20
  • 57
0
votes
1 answer

How do I style a range control to include a vertical line

I'm working with Openlayers and I've implemented the layer swipe control. https://openlayers.org/en/latest/examples/webgl-layer-swipe.html I would like to have this same functionality with a line extending vertically across the map. Something like…
Funn_Bobby
  • 647
  • 1
  • 20
  • 57
0
votes
1 answer

Properties don't exist for OpenLayers event.context

I'm trying to follow an example from OpenLayers. https://openlayers.org/en/latest/examples/layer-swipe.html I've imported what I need and I'm working on implementing the example in my code but I'm running into an issue where the properties of the…
Funn_Bobby
  • 647
  • 1
  • 20
  • 57