Open Zodiase opened 6 years ago
Overlays seem to not load after changing to EPSG:3857
.
For what it is worth it looks like it is off by a factor of about 120,000
@kintigh If you take a look at the comment in another issue I linked above, from my understanding of it, the scale line control is doing exactly it's supposed to (in other words it was not wrong but we were using/reading it wrong). Previously when we saw the reading was funny, the map was using EPSG:4326
projection, in which case the measurement should be read as "the vertical distance at the center of the view" or "the horizontal distance at the equator". In conformal projections such as EPSG:3857
, the measurement is what we expect it to be (horizontal distance at the center of the view). But I can't say why the control can't be smarter and take projection into consideration and do the proper thing. There must be a GIS reason behind it (as the linked comment says, in non-conformal projections we are asking the wrong question).
Now the reading looks correct after switching to EPSG:3857
, but the switch is causing problems when loading variable overlays from GeoServer. The loaded overlay tiles are all empty.
As you can see with EPSG:3857
the reading is much more reasonable.
Yes the above looks reasonable, but what we are seeing isn't just a difference in the vertical and horizontal scales and the projection. That can't account for a factor of 120,000.
See https://github.com/openlayers/openlayers/issues/5503#issuecomment-229473998
For the scale line to make sense (measuring horizontal distance at the center of the view), the projection has to be
conformal
, which means it needs to be something likeEPSG:3857
, for example.