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