5 votes
Accepted

How to apply style for all vertices of MultiPolygon

You would need to flatten the MultiPolygon coordinates to a depth of 2 to get the vertices for a MultiPoint geometry MultiPolygon: [ new Style({ stroke: new Stroke({ color: blue, ...
  • 11.3k
3 votes
Accepted

Render multiple COG files using OpenLayers

COGs within a GeoTIFF source must be able to use the same tile grid, but as in https://openlayers.org/en/latest/examples/multiple-cogs.html a layer can also have multiple GeoTIFF sources, so this ...
  • 11.3k
2 votes
Accepted

Distinguish features inside a cluster with OpenLayers

You could find the nearest original feature using vectorSource.getClosestFeatureToCoordinate(event.coordinate). To reflect the real feature position set to tooltip coordinate to spiderFeature....
  • 11.3k
2 votes
Accepted

Only display OpenLayers map on event

As you have coded it the map variable is not in scope of the myFunction so the updateSize() call does not work. You could give the button an id then use a single script and set the click listener in ...
  • 11.3k
2 votes
Accepted

How to zoom out in Openlayer in the particular extent?

You can try with this function: const handleSquareZoomOut = () => { const dragZoom = new ol.interaction.DragZoom({ condition: ol.events.condition.always, out:true, }) ...
1 vote
Accepted

How to disable right click for Draw mode?

Specify a condition which restricts drawing to the left button: this.draw = new Draw({ source: this.source, type, stopClick: true, condition: (e) => noModifierKeys(e) &...
  • 11.3k
1 vote
Accepted

Why I dont get feature props after set it in Draw?

Your code is returning the first feature that forEachFeatureAtPixel finds. Yoiu should not return until you find the one you want. const feature = this.mapRef.forEachFeatureAtPixel( this....
  • 11.3k

Only top scored, non community-wiki answers of a minimum length are eligible