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
1
vote
2 answers

How to update an XYZ layer in Open Layers 5

Is removing and re-adding an XYZ layer the only way to update it in ol5? I know TileWMS has an updateParams() method, which is nice, but some of the layers I'm working with are XYZ with a time query parameter. Here is the pseudo code for how I've…
Michael
  • 2,825
  • 3
  • 24
  • 30
1
vote
0 answers

OpenLayers 5 loads the WFS features but doesn't add and show them in the map

This should actually be very easy, but I've been stuck here for two days and still can't find a reason why OpenLayers doesn't do what I am expected from the API. There is a WFS Layer I want to load and show in my map. The Capabilities can be seen…
Min XIE
  • 463
  • 8
  • 19
1
vote
1 answer

In openlayers multiple markers at same lat and long not showing all markers

I am using openlayers to show markers in map but the markers with same lat and long doesn't show instead it shows the picture below: markers as count I am expecting that when I zoom in it shows markers as pushpins but it only shows like the picture…
user10496245
  • 217
  • 3
  • 17
1
vote
1 answer

what add marker to map openlayer 5 with angular 6

I'm using the OpenLayers 5 for my project in angular 6. I implemented it to show a map and it is working :-). But I can't make it show any markers, please help me!!! Show examples with this version OpenLayers... import OlMap from 'ol/Map'; import…
1
vote
0 answers

Get style of KML feature in OL5

I am trying to extract the style of a KML. It appears on screen fine, as if the style is embedded, but when I try to get the style object: var fs=new ol.format.KML().readFeatures(data); for (i=0;i
Bill Ferster
  • 347
  • 1
  • 5
  • 17
1
vote
1 answer

ol-cesium: Is there a way to select a feature in ol-cesium and track it back to openlayers features?

I have a geojson that was added as a feature vector to openlayer. All the geojson in their properties section have some additional information that I want to display on clicking a feature (eg a popup) in 3d space. I used the ol-cesium overlay…
Arvind
  • 21
  • 5
1
vote
1 answer

OpenLayers 5: stroke width scaling?

Is it possible to make Stroke width dependent on the zoom level? Basically, I am going to use LineStrings/MultiLineStrings to highlight some roads but I would also like to be able to zoom out and not have massive clutter (there will be about 8…
Rezenbekk
  • 13
  • 2
1
vote
0 answers

OL 5: Smooth transitions when rapidly changing layers

I have some png's (transparent radar images) that I want to show as an imagelayer. Had no problem doing so........I loaded an image, than removed it, loaded a new one, removed it and so on..... But by doing it this way the transitions are not smooth…
user1939338
  • 117
  • 9
1
vote
0 answers

Blurry map with OpenLayers

I have a very standard OpenLayers setup, and the map shows up fairly blurry compared to normal Of note, when I zoom the page (Note: not zoom the map) with the browser it looks good: I'm not sure what to do here, I have pixelRatio of the map set to…
user37309
  • 597
  • 5
  • 14
1
vote
0 answers

In angular and openlayers, set the name of the map points to be dynamic

I am using angular6 and openlayers5. The scenario is that the user does a search and some features are get from the database and rendered on a OL vector layer. The features already have a name at this point, that came from the database…
slevin
  • 4,166
  • 20
  • 69
  • 129
1
vote
1 answer

Openlayers - How to get rendered symbol list with declutter option?

I added the vector layer with "declutter" option in OpenLayers v5. Source feature was 500 (five hundred) and rendered result is almost 50 (fifty). After render, I wanna get only fifty rendered list from layer instance. I know that…
Jin-Kwon Lee
  • 387
  • 1
  • 4
  • 7
1
vote
3 answers

Add features to the map in OpenLayers 5

I have a following code in HTML Vector Style Examples
Piotr Koller
  • 599
  • 3
  • 8
  • 17
1
vote
1 answer

Wait until openlayers 5 geolocation returned a value

I am using openlayers 5 to implement a simple geolocation functionality : When check the geolocation checkbox, the geolocation starts, zooms to the position with an animated transition and it automatically tracks the position constantly. It adds a…
codebot
  • 517
  • 8
  • 29
  • 55
1
vote
1 answer

How to get coordinates of a projected feature with infinite panning (OpenLayers)

I am creating a popup control for displaying information when a user moves the mouse over a feature on a specific layer. I want the popup to snap to the geometry (point) of the feature and not use the coordinate of the mouse position. The issue is…
Bob Jones
  • 13
  • 4
1
vote
1 answer

Open Layers 5 containsXY not working. Check if a coordinate is in Polygon

I'm trying to check if a point is within a Polygon. This is my function: import { containsXY } from 'ol/extent'; isInside(polygon, longitude, latitude) { polygon = JSON.parse(polygon); // Polygon is originally = JSON.stringify([[long1,…
Genarito
  • 3,027
  • 5
  • 27
  • 53