Closed prushforth closed 9 months ago
// in attributechangecallback of mapml-viewer.js
this.querySelectorAll('layer-').forEach((layer) => {
layer.dispatchEvent(new CustomEvent('map-change'));
});
We currently dispatch the map-change
event in the projection attributeChangeCallback, maybe it should dispatch a new map-projectionChange
event to notify layer- / map-extent that the projection is changed, instead of map-change
? The map-change
event should only be used when the checked attribute of layer- is changed.
When complete, don't forget to improve (and link to index.html) the experiment that shows how this works
This is more of a new use case than a bug, but it should probably work. Seems like quite a good opportunity to improve map usability.
When you create a map using the following markup and then you change the
projection="OSMTILE"
, via $0.projection = "CBMTILE", the layer should continue to be displayed, with the different content from the CBMTILE extent. It doesn't throw errors, but it doesn't work.