I want to embed a small square in an Activity showing the user's location. The problem is, the activity takes about 15 seconds to load when I have the MapView in. When I take the MapView out, the Activity only takes about 2-3 seconds to load. Are开发者_运维技巧 there any suggestions to speed this up or should I just replace it with a button that directs the user to the official maps app?
Try to use the static google maps api. It has a lot of features (zoom level, markers, nearby query) and the implementation is very easy, you just need to send a GET request.
http://maps.googleapis.com/maps/api/staticmap?center=latitude,longitude&zoom=15&size=200x150
When you do receive the image data, just put it into an ImageView.
documentation: http://code.google.com/apis/maps/documentation/staticmaps/
精彩评论