New answers tagged openlayers
0
votes
OpenLayers 6 custom control using Vuetify and a resizable div
I ended up abandoning the templates I kept finding on forums and trying to use the addControl function of the Map object and passing as element a v-container with a unique id I wrote just as you would ...
1
vote
Accepted
OpenLayers import CspLine with KML
Your code is styling the drawn line as cspline. To save it you must convert it to cspline.
Either when drawn by changing
event.feature.set("cspline", true);
to
event.feature....
0
votes
Toggle dark mode on and off using on and un in OpenLayers
As mentioned in this answer the problem I had was that I was reassigning the function each time and therefore un was not matching it to the binded signature of the on listener.
0
votes
OpenLayers trigger map click on specific coordinates
Try to look for a different event triggering method here.
1
vote
Change the color of map elements with a unique ID
If your GeoJSON features have unique id as feature attribute id, this becomes also OL feature id, and then you can retrieve this feature from layer source by .getFeatureById method. You can then set ...
0
votes
How to set different style and name for each feature individually OpenLayers
You have to use a 'style' function on your vector layer definition. It will be called for each feature before rendering and should return the corresponding style.
var layer = new ol.layer.Vector({
...
0
votes
Layer Preview not working at all on GeoServer
After the correct configuration of JAVA_HOME and Path variables, with IDK 8 directions :
path= %JAVA_HOME%\bin;
JAVA_HOME=C:\Program Files\Java\jre1.8.0_321
and, after the reboot of the PC, the ...
3
votes
OpenLayers GeometryCollection styling issue
Problem is that you are referencing global value labelInput.value when defining text label in the style. This causes style to always reflect current value of labelInput.value when styling features.
...
1
vote
Accepted
GetFeatureInfo in OpenLayers only if the layer is visible
You can check the visibility of the layer in the callback function, and exit if not visible:
map.on('singleclick', function(evt){
if (!wmsLayer3.getVisible()) return;
document....
0
votes
OpenLayers/Angular/ol-cesium : Point vectors show on both 2D/3D map / polygons don't
I have made some progress regarding this issue and I wanted to let you know.
At first, the map I was displayed with the projection EPSG:3857.
Then I had to change the projection (for reasons unrelated ...
2
votes
Accepted
How to get layers name added to OpenLayers map v6.14.1?
Layers in OL do not have names by default, but you can give layer a name by setting some custom layer property, like for example using custom option name: 'My layer name'. Then your code above will ...
Top 50 recent answers are included
Related Tags
openlayers × 3306javascript × 585
geoserver × 481
wms × 253
geojson × 234
wfs × 157
openlayers-2 × 152
coordinate-system × 146
openstreetmap × 96
postgis × 94
style × 84
layers × 81
vector-tiles × 73
features × 71
mapserver × 67
getfeatureinfo × 67
tiles × 66
polygon × 61
qgis × 60
vector × 58
extents × 58
web-mapping × 57
vector-layer × 53
zoom × 50
leaflet × 47