MonoTouch MKMapView Zoom Level

I needed to implement  a zoom level similar to Google Maps style for MonoTouch iOS and lucky me after doing little search on the web I found this article http://troybrant.net/blog/2010/01/set-the-zoom-level-of-an-mkmapview/ written by Troy. This is exactly what I was looking for except it was in Objective-C.

So with my little knowledge of Objective-C I copied his code and converted this to C# for using MonoTouch library. I hope this code snippet will help other monoTouch coders as well. Also a big thanks to Troy for such a nice article.

[gist https://gist.github.com/djad442/5115021 /]

In order to use this copy the class to your project and update the namespace. Then in your XIB file, drop a regular MKMapView control and setup all the property you need. Then change the class name to MKMapViewZoomLevel (as is our custom class name).

 

MKMapViewZoomLevel

 

 

Advertisements

2 thoughts on “MonoTouch MKMapView Zoom Level

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s