I am attempting to let the user select an image from the gallery on the SD card. I am able to get the image from the gallery, but I don't know how to make a map overlay on Google Maps with the custom image. Do I use a Uri to make the overlay or do I use the image path?
Here is how I was drawing the map overlay with images that I included in drawable:
Drawable drawab开发者_如何学PythonleRed = this.getResources().getDrawable(R.drawable.map_location_icon);
MapItemizedOverlay itemizedoverlayRed = new MapItemizedOverlay(drawableRed);
GeoPoint point = new GeoPoint(32221740,-110926480);
itemizedoverlayRed.addOverlay(overlayitem);
mapOverlays.add(itemizedoverlayRed);
Solution:
Drawable drawableRed = new BitmapDrawable(bMap);
http://developer.android.com/reference/android/graphics/drawable/BitmapDrawable.html
精彩评论