Hi! I am using openlayers to get map with openstreetmap with projection: 'EPSG:4326', but always, In the same position I see the map badly (as you can see in the photo). I am not sure how I can solve this. asked 15 Oct '19, 08:55 Marina |
It looks like you are displaying in epsg 4326, but using an underlying tile source that is in epsg 3857. OpenLayers is probably choosing whichever tiles require the least distortion or rescaling, and this changes based on the latitude. So your picture shows zoom level 4 tiles in the south, and zoom level 3 tiles further north. The two solutions are to either display the tiles in their native projection (i.e. change display to 3857) or to find a tile source in your display projection (i.e. tiles in 4326). answered 15 Oct '19, 11:15 Andy Allan Hi, Thanks for the answer. I thought that openstreetmap has all the kinds of projection or funtions to manage them. I solved it using useGeometries() function in openlayers(v 6.x), and it gives me other problems as raster render, but It allows to see the map correctly
(16 Oct '19, 16:46)
Marina
|