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

OpenLayers: Utility getSource().on to wait one second to load or reload TileLayer

I am using OpenLayers5. I'm working with Tile Layers in my project, but I need that when I move to the map, the layer will load with one second delay to no call many times to server. My code is app.controller("MainController", [ function () { …
0
votes
1 answer

Openlayers 6: Simplifying a Feature with properties

Background I use Openlayer 6 where I have a Feature which I want to simplify. The solution display multiple Feature which each has a property named velocities. The list of velocities corresponds 1-to-1 to the coordinates of…
SOK
  • 515
  • 6
  • 21
0
votes
0 answers

Error loading TopoJSON file in Openlayers 5

I have a valid TopoJSON file (validated by Mapshaper) that is not properly loading into openlayers. The topoJSON was created from a valid GeoJSON files that DOES load properly into OpenLayers. TopoJSON file:…
mosier
  • 21
  • 3
0
votes
2 answers

Is there a way to get the new coordinates of the modified polygon in openlayers?

I am giving the map a four coordinates that makes up a polygon: var x_1 = 28.0244307; var y_1 = -25.8635238; var x_2 = 28.0244307; var y_2 = -25.8835238; var x_3 = 28.0444307; var y_3 = -25.8835238; var x_4 = 28.0444307; var y_4 =…
0
votes
1 answer

Styling GeoJSON by filters in OpenLayers

I'm trying to style a GeoJSON based on a layer's classification by classes. I'm trying to do it using the method of the greaterThan type filters etc ... This would be more or less how I'd like to classify the GeoJSON. I did the following,…
user68481
  • 9
  • 2
0
votes
0 answers

gis map rendering using Openlayer 6

We are using Mapnik, Mapproxy and Openlyer6 for the development of GIS based web solutions. The GIS data from Postgis enabled postgresql DB. We are using EPSG: 32643 Projection and got the Map output but when we tried to add a point on the map…
Anju
  • 137
  • 2
  • 10
0
votes
0 answers

XYZ image tile viewer using the Google Maps format instead of Zoomify

I am trying to create a basic image viewer using OpenLayers. I have a large image that I have split into image tiles of the Google Maps format where tiles are stored in a set of numbered directories, one for each zoom level. e.g. Directory…
Gecko29
  • 179
  • 1
  • 2
  • 12
0
votes
1 answer

Go to specific zoom values on mouse wheel movements in openlayers

I have created a map using openlayers and have created an array of zoom values which are in decimals (for ex. [0.2, 1.13, 2.15, 3.45, 4.23, 5.14]. Now when I use mouse wheel to zoom in or zoom out of the map the zoom values changes in integer (for…
Akash Sharma
  • 129
  • 9
0
votes
1 answer

Openlayers (ol5) mouseposition and map.on positions out by ~-5km north, ~-3km East

I am attempting to port an Openlayers2 site to OL5. The OL2 implementation has been working fine for years and does not have the issues described here. I have most stuff working but am stumped by the following: the displayed mouse position, and the…
madpom
  • 1
  • 4
0
votes
1 answer

Show geotiff format images

I am new to Here Api, until now I was just using the HERE Map Tile API in a OpenLayers Maps. I have several .tiff format images, and I wanted to show these images at their coordinates on the front-end using angular 8 and OpenLayers.Like the…
Paulo Ilheu
  • 61
  • 1
  • 4
0
votes
1 answer

In OpenLayers why is calculateExtent zoomed out

I am trying to capture the extent of my Map on 'moveend' and it seems that the extent that is being captured is zoomed out quite a bit... idle(event) { function onMoveEnd(evt) { const mapChange =…
Funn_Bobby
  • 647
  • 1
  • 20
  • 57
0
votes
1 answer

How can I convert VectorSource to RasterSource

In OpenLayers ol.source.ImageVector has been deprecated since v5. Docs recommended to use an ol.layer.Vector with renderMode: 'image' instead. But what if I want to get an another raster source at output? (Not a layer) Is there any workaround?
Dmitriy Korobkov
  • 867
  • 1
  • 11
  • 25
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
2 answers

OpenLayers v5 ol.Overlay and Zooming behavior

I am currently using openlayers and using new ol.source.ImageStatic as my map. I wanted to have a transparent image over the top of the map and used ol.Overlay with element.innerHTML to overlay the image. I am now experiencing zooming issues with…
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)=>{ …