This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Problem render EPSG 4326

0

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.

alt text

asked 15 Oct '19, 08:55

Marina's gravatar image

Marina
11112
accept rate: 0%


One Answer:

2

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%20Allan's gravatar image

Andy Allan
12.5k23128153
accept rate: 28%

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

Source code available on GitHub .