Error in calculating extent of layer with no specified projection
The extent of layers with no specified projection fails to take into account the projecton of the map viewer, resulting in incorrect extent/bounds calculations.
In the screen shot below, the extent/bounds are the tiny dot in tile col=2,row=3, and the place mark is supposed to be within that extent.
Steps to recreate
Use this map:
<mapml-viewer projection="CBMTILE" controls lat="0" lon="0" zoom="0" >
<layer- src="test.mapml" checked></layer->
</mapml-viewer>
where test.mapml is the following:
<mapml- xmlns="http://www.w3.org/1999/xhtml">
<map-head>
<map-title>Extent bug</map-title>
<map-meta charset="utf-8" ></map-meta>
<map-meta name="extent" content="top-left-latitude=45.5, top-left-longitude=-75.8, bottom-right-latitude=45.3, bottom-right-longitude=-75.6"></map-meta>
</map-head>
<map-body>
<map-feature id="thing1">
<map-featurecaption>a11y caption goes here</map-featurecaption>
<map-geometry cs="gcrs">
<map-point>
<map-coordinates>-75.691084 45.4079051</map-coordinates>
</map-point>
</map-geometry>
<map-properties>
<h1>Feature properties html</h1>
</map-properties>
</map-feature>
</map-body>
</mapml->
Here's a <map-feature> that has a geometry that matches the <map-meta name="extent" ...> above:
<map-feature id="thing2">
<map-featurecaption>extent as a feature</map-featurecaption>
<map-geometry cs="gcrs">
<map-polygon>
<map-coordinates> -75.8 45.5 -75.6 45.5 -75.6 45.3 -75.8 45.3 -75.8 45.5</map-coordinates>
</map-polygon>
</map-geometry>
<map-properties>
<h1>Feature properties html</h1>
</map-properties>
</map-feature>
Implemented in https://github.com/Maps4HTML/Web-Map-Custom-Element/pull/854
Implemented in #854
I think the bug is present in our map-extent branch though, so probably still a bug?
Relates to #677
The symptoms of this problem are now different, but there's still a problem. If you zoom to the <layer- src="test.mapml"> above, you won't zoom into the small polygon that does surround the point, but to a much larger extent that doesn't seem related to the layer content: