MapCache icon indicating copy to clipboard operation
MapCache copied to clipboard

Skewed downloads if the map used for selecting the area does not use maximum lat range (-85.0511, 85.0511)

Open merlos opened this issue 4 years ago • 0 comments

To reproduce:

  1. Create a controller with a MapView that uses Apple Maps. Use this map to select a region.

  2. Download a region with a MapCache that uses Open Street Maps (OSM) as tile Server.

  3. Create a second controller that displays another MapView but this time using MapCache with OSM as tile server. Use the same MapCache used for downloading the region (ie: same name).

You´ll see that the second map does not display the area selected in the controller of (1), the tiles downloaded were in a different location.

The problem is that whereas Apple Maps uses -90 to 90 as range in the latitude, OSM only uses -85.0511 to 85.0511, so the conversion coordinates to tiles does not work.

In the code, this conversion is done in TileCoords

Related with #5

merlos avatar Sep 01 '19 21:09 merlos