Starting from OpenLayers v. 10.3 I can no longer load topoJSON files which worked till 10.2.1. Here's what happens:
-I made no changes in js code. A layer is configured as follows
var vectorLayer = new ol.layer.VectorImage({
source: new ol.source.Vector({
format: new ol.format.TopoJSON(),
url: 'shape/myLayer.json',
}),
style: {
'stroke-color': 'black',
'stroke-width': 1.5,
},
can });
topoJSON
file is the same I used till rel. 10.2.1if I use OL rel. 10.3 (and 10.3.1 and 10.4) map doesn't show the layer; if I query layer extent with a simple alert I get "infinity, infinity, infinity, infinity", so I guess no element from topoJSON file has been loaded
everything works in 10.3 if I replace the topoJSON file with the very same file in geoJSON format (I can see features in map and I get correct extent)
A geoJSON
file works the same in rel. 10.3 as in 10.2.1, so I believe something broke topoJSON
source in 10.3.
Please note that I don't use npm, still everything is working as expected except topoJSON (starting from 10.3; and in 10.3.1 and 10.4 also).
Thanks in advance for help