mike-000
mike-000
` feature1 = new Feature(); feature1.setId('one'); source.addFeature(feature1); feature2 = new Feature(); feature2.setId('one'); source.hasFeature(feature2); // returns true ` seems wrong to me. Id is only unique within one source.
Many GeoJSONs simply allocate feature `id` sequentially starting at 1, so assuming `id` is unique across multiple sources (where only `uid` is unique) would not be valid. If someone wanted...
It can be done similar to the changes in https://openlayers.org/en/latest/examples/icon-negative.html but you don't need to change individual pixels, just use globalCompositeOperation '`color` to gray the image, followed `destination-in` to restore...
An SVG string is not an image. The only thing missing in your code was to put `svgSource` inside the `encodeURIComponent()` https://codepen.io/mike-000/pen/NWYJKjP
If the image has not loaded you will have a zero size image. As long as you call the `grayStyle()` method in a style function that should not be a...
It is loaded automatically for the first marker which uses the style directly. A different color creates a different cached style, which is not loaded automatically when used by the...
See also https://github.com/openlayers/openlayers/issues/13828
You can set the view to a fractional zoom level but the total number of zoom levels as defined by `maxZoom`/`minResolution`, `minZoom`/`maxResolution` and `zoomFactor` must be an integer. To achieve...
Whatever the value, when `nodata` is specified (or detected) an additional band is returned which can be used as alpha when styling https://codesandbox.io/s/cog-forked-kthbsh?file=/main.js
My first thoughts would be to use either `offsetX`/`offsetY` or `displacement` for both image and text and deprecate the other. If `displacement` is used it would have the same meaning...