Opened 11 years ago

Closed 11 years ago

#1074 closed defect (invalid)

Slippy Export tab embeddable html bbox extents error

Reported by: merdin Owned by: Tom Hughes
Priority: trivial Milestone:
Component: mapnik Version:
Keywords: Cc: jason.abele@…

Description

I was exporting an embeddable html link for a map of a point in Maputo Mozambique and noticed that the link did not retain the proper bounding box. It seems the north and south latitude coordinates are reversed in the output from the export link, causing the embedded map to display the whole world rather than the appropriate bounding box.

Perhaps because the coords are negative (southern hemisphere) they are being sorted to the wrong order?

Default output:

<iframe width="425" height="350" frameborder="0" scrolling="no" 
    marginheight="0" marginwidth="0" 
    src="http://www.openstreetmap.org/export/embed.html?bbox=32.58301,-25.97939,32.58805,-25.97454&layer=mapnik&marker=-25.97551,32.58475" 
    style="border: 1px solid black">
</iframe>
<br />
<small>
    <a href="http://www.openstreetmap.org/?lat=-25.976965&lon=32.585530000000006&zoom=16&layers=B00FTFTT&mlat=-25.97551&mlon=32.58475">View Larger Map</a>
</small>

Corrected North/South? Coords Swapped

<iframe width="425" height="350" frameborder="0" scrolling="no" 
    marginheight="0" marginwidth="0" 
    src="http://www.openstreetmap.org/export/embed.html?bbox=32.58301,-25.97454,32.58805,-25.97939&layer=mapnik&marker=-25.97551,32.58475" 
    style="border: 1px solid black">
</iframe>
<br />
<small>
    <a href="http://www.openstreetmap.org/?lat=-25.976965&lon=32.585530000000006&zoom=16&layers=B00FTFTT&mlat=-25.97551&mlon=32.58475">View Larger Map</a>
</small>

I hope slippy map is the right place to assign this error ... but I am new here, so I don't really know the names of different components very well. Great project overall though, thanks for the hard work

Change History (1)

comment:1 Changed 11 years ago by Tom Hughes

Resolution: invalid
Status: newclosed

They're not reversed - the first one is the latitude of the bottom of the map and the second is the latitude of the top of the map. In the southern hemisphere that means the first one is more negative than the second.

What's more it seems to work for me - I get a map of the expected area not of the whole world.

Note: See TracTickets for help on using tickets.