开发者

How can I use an image for the user to make a custom map overlay?

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜