A MapKit for Mac OS X?

前端 未结 1 1561
终归单人心
终归单人心 2020-12-29 07:17

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

相关标签:
1条回答
  • 2020-12-29 07:32

    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.

    0 讨论(0)
提交回复
热议问题