问题
I am going to implement an in-application maps in my Android application, so my first thought was: Google Maps.
However it does not support caching - if user closes application, all loaded maps are deleted. Then I found Bing Maps which supports caching.
There is Bing Maps Android SDK
, but it is delivered as a whole Android application. I do not know at all how to use it.
Are there any tutorials, examples, etc showing how to use it with custom application as a build-in activity ?
回答1:
The SDK is an Android project, so:
- Download it from http://bingmapsandroidsdk.codeplex.com/
- Extract it
- Import it into Eclipse using
File -> Import -> Existing Projects into Workspace
- Right click the project and choose
Run As -> Android Project
It shows how you can use the BingMapView
.
However, I get a message on the map that says
Invalid Credentials. Sign up for a developer account at: http://www.microsoft.com/maps/developers
After that, you're on your own. Perhaps check out their discussion board.
回答2:
I don't know about Bing, but you might like to consider Osmdroid which does support caching and offline tile sources
Osmdroid Home Page
It works much like the Google Maps API.
来源:https://stackoverflow.com/questions/8312437/using-bing-maps-android-sdk-as-a-library