Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A MapKit for Mac OS X?

on the iPhone we have the Apple's amazing MapKit. There is something similar for Mac OS X?

If possible something more advanced than a simple WebView, because I need that it manage automatically at least:

  • annotations
  • the user interaction
  • the zoom in/out
  • an overlay view

(Even if the maps are not from Google is ok.)

Thank you very much!

like image 994
Dev Avatar asked Jan 14 '11 08:01

Dev


1 Answers

Update 2

MapKit is available in OS X 10.9 Mavericks : Map Kit Framework Reference.

Update - pulled from my comment below

The situation has changed and there now exists a third party MapKit for Mac OS X. Find it at http://github.com/Oomph/MacMapKit and a small writeup at http://rickfillion.tumblr.com/post/1134987954/pretroducing-mapkit-for-mac


Orginal Answer

There is no such API from Apple on Mac OS X. You should file a bug request at bugreporter.apple.com.

The best alternative is to use the Google Maps JavaScript API embedded in a WebKit view. Visit the Google Maps JavaScript API V3 Documentation to understand the API.

I realize that you asked for more then a simple WebView, but perhaps you're unaware of some of the more advance functionality a WebKit view allows.

Webkit provides means for bridging between the JavaScript scripting environment in your WebKit view and the rest of your Cocoa application.

To call a Javascript function from Objective-C, use your WebKit view's WebScriptObject. "Using Javascript From Objective-C" from the "WebKit Objective-C Programming Guide" is a great place to start learning.

If you need to call back into your Cocoa application from Javascript, "Calling Objective-C Methods From JavaScript" in the "WebKit DOM Programming Topics" provides examples and explanation.

These technologies used carefully together should provide the functionality you require.

like image 154
Jason Medeiros Avatar answered Oct 21 '22 20:10

Jason Medeiros