How to find coordinates for Map Overlay placement

Hello everyone -

I created a navigation app that uses a map overlay for finite spaces such as a zoo. I get these overlays created by a designer in .PNG - the designer creates the overlays and then puts a square or rectangle box around the overlay because it needs to be placed in 9 pieces making it easier to render when user zooms in/out...

I used to have my Swift devs place the overlay using the correct coordinates that were given by a single person, but we never found out exactly how they did it - and now I can no longer contact the dev.

Can anyone help me by telling me how I can get the coordinates (I am thinking that any opposite vertices would do - and maybe the center point?).

I also have a few other questions:

a. Is .SVG best to use for map overlays?

b. Should we continue to chop into 9 pieces for faster rendering or is there a better way to do this in MapKit (we have been doing this for 4 years, maybe there is a better way)

I would be so thankful for any help.

Best,

Michael

Answered by DTS Engineer in 804704022

Take a look at using MKTileOverlay. Our sample code project has some examples that will help you understand how tiles work for rendering. Additionally, there's an example that shows you the tile coordinate scheme so that you can see what tiles cover the zoo, and where the boundaries are.

—Ed Ford,  DTS Engineer

Take a look at using MKTileOverlay. Our sample code project has some examples that will help you understand how tiles work for rendering. Additionally, there's an example that shows you the tile coordinate scheme so that you can see what tiles cover the zoo, and where the boundaries are.

—Ed Ford,  DTS Engineer

so she can chop into 9 equal pieces). It's almost like having to put her design back on top of a map, lining up the pathways, then looking at the corners for the coordinates. Is that possible to do in Mapkit after the design is created?

Rather than using 9 equal pieces, you should look at what zoom levels you want to have the zoo map for, and then look for the tile coordinates matching those zoom levels. At the edges of the zoo boundary, this may mean that the zoo edge isn't aligned to the edge of a tile, and that these edge tiles will have blank (or transparent) space between the boundary of the zoo and the edge of the tile. If you add zoom levels, the same principle applies, with each zoom making each tile half as wide and half as tall to add details and maintain text sharpness.

MapKit assumes that any tiles you bring are already aligned to this tile grid, so MapKit doesn't provide any functionality to custom align to your own tile grid. The tiling grid MapKit uses is not unique to MapKit, it is the EPSG:3857 standard that is in wide-spread use, so it's worth investing the time to figure out this alignment as a one-time task, since you may be able to reuse that time investment matching up with the standard.

—Ed Ford,  DTS Engineer

How to find coordinates for Map Overlay placement
 
 
Q