Пример #1
0
 @Override
 public void onBeyondarObjectRemoved(
     BeyondarObject beyondarObject, BeyondarObjectList beyondarObjectList) {
   if (beyondarObject instanceof GeoObject) {
     GeoObject geoObject = (GeoObject) beyondarObject;
     GoogleMapGeoObjectModule gogmMod =
         (GoogleMapGeoObjectModule) geoObject.getFirstModule(GoogleMapGeoObjectModule.class);
     if (gogmMod != null) {
       if (gogmMod.getMarker() != null) {
         mMarkerHashMap.remove(gogmMod.getMarker());
       }
     }
   }
 }
Пример #2
0
  protected MarkerOptions createMarkerOptions(
      GeoObject geoObject, GoogleMapGeoObjectModule module) {
    if (geoObject == null || module == null) {
      return null;
    }
    Bitmap btm = getBitmapFromGeoObject(geoObject);

    return module.createMarkerOptions(btm);
  }
Пример #3
0
  protected void createMarker(GeoObject geoObject, GoogleMapGeoObjectModule module) {
    if (geoObject == null || module == null) {
      return;
    }
    Marker marker = module.getMarker();
    if (marker != null) {
      marker.remove();
    }

    if (mMap == null) {
      return;
    }
    MarkerOptions markerOptions = createMarkerOptions(geoObject, module);
    if (markerOptions != null) {
      marker = mMap.addMarker(markerOptions);
      module.setMarker(marker);
    }
  }