Shiim
Shiim

Reputation: 439

Custom map for iPhone

I'd like to make an app which would use custom map (instead of Google's map), transferred via WMS (Web Map Service). As far as I understand, I can't use MapKit, because there is no way to get rid of Google maps. So, the only way seems to be implementing my own map system. But which would be the best way to do it? I also want the map to have the features like showing user's current location etc. Maybe I should start from the scrollview?

Upvotes: 0

Views: 168

Answers (1)

Amy Worrall
Amy Worrall

Reputation: 16337

For your drawing, start with a CATiledLayer. That helps you load the different tiles asynchronously, and pan and zoom without slowdown. It's pretty poorly documented, although there are a few examples (like this one) scattered around the net. It does work though: it is used to draw a custom map in my company's app Timeline World War 2.

For things like showing the user's current location, you'll need some algorithms to translate from latitude/longitude (that you found out through Core Location) into whatever projection your map is currently using, and then get the scroll view containing your tiled layer to move to the right position.

Upvotes: 1

Related Questions