New answers tagged openlayers
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 ...
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 ...
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 ...
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 ...
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
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 ...
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 ...
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[...
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) {
...
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": {
"...
Top 50 recent answers are included
Related Tags
openlayers × 3574javascript × 604
geoserver × 497
wms × 271
geojson × 258
wfs × 170
openlayers-2 × 160
coordinate-system × 158
openstreetmap × 104
postgis × 99
layers × 91
style × 91
features × 83
getfeatureinfo × 74
vector-tiles × 71
tiles × 70
mapserver × 68
vector × 67
polygon × 66
extents × 65
vector-layer × 62
qgis × 61
web-mapping × 57
zoom × 57
leaflet × 48