Open Source Objective-C library that mimic Google Map APIs

April 10, 2009 § Leave a comment

By default UIWebView is designed for viewing quick loading web pages. If you intend to view any AJAX-loaded application such as Google map with JavaScript API calls and compiling tiles with data network, you are not going to get good user experience.

This open source project gives you Objective-C library you can integrate to your project. It adds Objective-C methods to mimic Google JavaScript API calls and AJAX responses.

– (NSString*) evalJS:(NSString*)script;

//– Methods corresponding to Google Maps Javascript API methods —————
– (int)       getZoom;
– (void)      setZoom:(int)zoomLevel;
– (void)      zoomIn;
– (void)      zoomOut;
– (GLatLng)   getCenterLatLng;
– (GPoint)    getCenterPixel;
– (void)      setCenterWithPixel:(GPoint)pixel;
– (void)      setCenterWithLatLng:(GLatLng)latlng;
– (void)      panToCenterWithPixel:(GPoint)pixel;
– (GLatLng)   fromContainerPixelToLatLng:(GPoint)pixel;
– (GPoint)    fromLatLngToContainerPixel:(GLatLng)latlng;
– (int)       getBoundsZoomLevel:(GLatLngBounds)bounds;
– (void)      setMapType:(NSString*)mapType;

http://code.google.com/p/iphone-google-maps-component/

This open source project allows your iPhone application to access all basic features of Google Maps (similar to Android’s MapView). It uses a UIWebView in the background to load the HTML/Javascript version of Google Maps.

It offers a set of Objective-C methods that mimic a subset of the original Javascript methods for controlling the map. It currently supports setting the center location and zooming & panning using the touch interface.

It supports for adding clickable and draggable non-javascript markers.

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

What’s this?

You are currently reading Open Source Objective-C library that mimic Google Map APIs at Web Builders.

meta

%d bloggers like this: