我無法將Google Places API提供的圖標添加到標記。例如,我想有該圖標在谷歌Places API的的JSON返回:谷歌地圖v2安卓設置標記圖標從URL
"icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png"
這裏是我怎麼做,現在不添加圖標:
for (Place place : mNearPlaces.results) {
LatLng placeLatLng = new LatLng(place.geometry.location.lat,
map.addMarker(new MarkerOptions()
.position(placeLatLng)
.title(place.name));
}
我看着this post和答案建議使用一些AsyncTask來下載圖像。有沒有其他的方式來做到這一點(這種方式似乎很慢)?有沒有設置Google Places API提供的標記圖片的標準方式?
這裏是Google Maps Android API v2 Documentation for Markers
感謝