Closed ffxsam closed 6 years ago
I cannot reproduce this. Looks like the image was reprojected, i.e. your view has a different projection than EPSG:3857, in which case what you see is expected.
You can verify with the official examples (e.g. https://openlayers.org/en/latest/examples/here-maps.html) that the Adler Planetarium is round.
@ahocevar You're totally right, it's because I was using the EPSG:4326 projection in order to use lat/lng for all coordinates on the map. I didn't want to use the default of EPSG:3857 because it doesn't allow us to use lat/lng values for focusing on parts of the map. What's my recourse here?
You'll want to use fromLonLat()
and toLonLat()
.
Thanks! I was looking for a way to avoid having those all over my code, but I'll take that over distorted imagery. 😉
have the same problem, changed all coordinates to fromLonLat()
but it just feels wrong to have calls to that all over the place just to give the view "what it wants"
i don't want to sound ungrateful but what is the point of different projections on the view if they only work correctly with exactly one setting?
The Adler Planetarium should definitely be round. This happens regardless of what tileset I use (Here, Mapbox). I'm just pointing the
Map
class to a regular div (<div id="#map"></div>
), there's no special JS-based sizing going on.