1
當我setLocationSource時,Google地圖會自動顯示藍色圖標。任何人都知道如何去除藍色圖標?Google地圖V2禁用MyLocation藍色圖標
謝謝。
還有就是我的編碼:
private Marker myLocation = null;
private void prepareMapSetting(GoogleMap aGoogleMap)
{
aGoogleMap.setLocationSource(mLocationSource);
aGoogleMap.setOnMyLocationChangeListener(mOnMyLocationChangeListener);
aGoogleMap.setOnMapLongClickListener(mOnMapLongClickListener);
aGoogleMap.setMyLocationEnabled(true);
}
private OnMapLongClickListener mOnMapLongClickListener = new OnMapLongClickListener()
{
@Override
public void onMapLongClick(LatLng point)
{
if(null != mOnLocationChangedListener){
if(null == myLocation){
myLocation = getMap().addMarker(new MarkerOptions()
.position(point)
.title("You")
.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));
}
else{
myLocation.setPosition(point);
}
Location location = new Location("LongPressLocationProvider");
location.setLatitude(point.latitude);
location.setLongitude(point.longitude);
mOnLocationChangedListener.onLocationChanged(location);
}
}
};