cpmac
cpmac

Reputation: 69

offline retina map tiles too big

This question has no answer since august. I've found no question identical. I hope it's clear enough. There seems to be few questions on maps but someone must know the answer.

I'm trying to display an offline map using 512x512 tiles. I have the tiles named like [email protected] if I use the 256x256 tiles the map displays correctly, but the 512 tiles only show a quarter of each tile. here's my code

//Get the URL template to the map tiles
let baseURL = NSBundle.mainBundle().bundleURL.absoluteString

//let urlTemplate = baseURL.stringByAppendingString("osmm/{z}/{x}/{y}.png/")
let urlTemplate = baseURL.stringByAppendingString("two/{z}/{x}/{y}@2x.png/")

print(urlTemplate)


let carte_indice = MKTileOverlay(URLTemplate:urlTemplate)

carte_indice.geometryFlipped = false

carte_indice.canReplaceMapContent = true

carte_indice.maximumZ = 18
carte_indice.minimumZ = 16



self.mapView.addOverlay(carte_indice)

What do I need to add to get the tiles to display correctly? Is a map using 256x256 tiles on a retina screen acceptable by apple?

Upvotes: 0

Views: 97

Answers (0)

Related Questions