New answers tagged

1 vote

Multiply line using style in OpenLayers

This solution is based upon Leaflet plugin Leaflet Polyline Offset. Coordinates are first converted to map pixels and the offset is then done on pixel coordinates. In Leaflet pixel coordinates are the ...
TomazicM's user avatar
  • 22.8k
0 votes

Show/hide feature text depending on zoom in OpenLayers 7

Thanks to some parts of @TomazicM 's example. I was able to solve my problem. Here is the updated code with all supporting code added. It still uses setScale, but is called from a more appropriate ...
Andre Hulet's user avatar
2 votes
Accepted

Multiply line using style in OpenLayers

One possible solution is to use turf.js library turf.lineOffset method to create parallel lines in style function. Relevant part of the code to show two parallel lines for the same linestring could ...
TomazicM's user avatar
  • 22.8k
0 votes
Accepted

Show/hide feature text depending on zoom in OpenLayers 7

One possible way to control feature text display depending on zoom level is to use layer style option function to add text to style only above desired zoom. Here is an example of code for random ...
TomazicM's user avatar
  • 22.8k
0 votes

Cesium on a standalone local network

You can try here and even produce your custom terrain. You can preview and download server software for free aswell https://portal.terrainserver.com Note: I am the provider for that service
Muhammed Kalkan's user avatar
0 votes

Show all data of the WMS GeoServer layer on single click at web page using OpenLayers 6 WMS GetFeatureInfo (Tile Layer)

Here is his I solved the issue: http:{geoserver_ip}/geoserver/ows?service=WFS&version=2.0.0&request=GetFeature&typeName={workspace}:{layer_name}&outputFormat=application/json If you ...
Atto2O's user avatar
  • 1
2 votes
Accepted

Retrying failed XYZ tile load in OpenLayers?

You are dropping through to Promise.reject() after setting timeouts so the status will be error, you should return after calling setTimeout. Also I am not sure if tile.load() has any effect if it is ...
Mike's user avatar
  • 12.1k
0 votes
Accepted

Can't call method of OpenLayers object: 'getSource is not a function'

In in my code sample, above, the syntax of l.getSource() is incorrect. Here's an updated code sample with corrected syntax. let lyrs = map_obj.getAllLayers(); for (let l in lyrs) { source = lyrs[...
Andre Hulet's user avatar
1 vote
Accepted

OpenLayers can't render the VectorTileLayer

With this piece of code: useEffect(() => { // Initialize OpenLayers map only if authenticated and not already initialized if (authenticated && !isMapInitialized) { ...
Kambei's user avatar
  • 131
0 votes

OpenLayers UTFGrid placeholders not resolved

Apparently, it is necessary to configure the TileJson parameter, as shown in this example here, to get OL do the substitution. const gridSource = new UTFGrid({ "tileJSON": { "...
ulrich's user avatar
  • 1,120

Top 50 recent answers are included