1

當我setLocationSource時,Google地圖會自動顯示藍色圖標。任何人都知道如何去除藍色圖標?Google地圖V2禁用MyLocation藍色圖標

謝謝。

Something like that

還有就是我的編碼:

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); 
     } 


    } 
}; 

回答

1

我不知道理解你的問題(我沒有看到你的形象太)。

其實setLocationSource只是設置mylocation層的位置源(即藍點......)

,如果你不想要的藍點,只是把

aGoogleMap.setMyLocationEnabled(false); 

並且不要使用locationSource