コード例 #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) {
    if (geoObject == null) {
      return null;
    }
    GoogleMapGeoObjectModule module =
        (GoogleMapGeoObjectModule) geoObject.getFirstModule(GoogleMapGeoObjectModule.class);

    return createMarkerOptions(geoObject, module);
  }
コード例 #3
0
  @Override
  public void onExternalBitmapLoaded(BitmapCache cache, String url, Bitmap btm) {
    final Bitmap resizedBtm = resizeBitmap(url, btm);
    ArrayList<GeoObject> list = mPendingBitmaps.getPendingList(url);
    for (int i = 0; i < list.size(); i++) {
      GeoObject gogm = list.get(i);

      final GoogleMapGeoObjectModule module =
          (GoogleMapGeoObjectModule) gogm.getFirstModule(GoogleMapGeoObjectModule.class);
      if (module != null) {
        sHandler.post(
            new Runnable() {
              @Override
              public void run() {
                if (module.isAttached() && resizedBtm != null) {
                  module.getMarker().setIcon(BitmapDescriptorFactory.fromBitmap(resizedBtm));
                }
              }
            });
      }
    }
  }
コード例 #4
0
  private Bitmap getBitmapFromGeoObject(GeoObject geoObject) {
    if (geoObject.getBitmapUri() == null) {
      return null;
    }
    boolean canRemove = !mPendingBitmaps.existPendingList(geoObject.getBitmapUri());
    if (!mCache.isImageLoaded(geoObject.getBitmapUri())) {
      mPendingBitmaps.addObject(geoObject.getBitmapUri(), geoObject);
    }
    Bitmap btm = mCache.getBitmap(geoObject.getBitmapUri());

    if (btm == null) {
      String uri = mWorld.getDefaultBitmap(geoObject.getWorldListType());
      btm = mCache.getBitmap(uri);
    } else if (canRemove) {
      mPendingBitmaps.removePendingList(geoObject.getBitmapUri());
    }

    return resizeBitmap(geoObject.getBitmapUri(), btm);
  }
コード例 #5
0
 protected void createMarker(GeoObject geoObject) {
   createMarker(
       geoObject,
       (GoogleMapGeoObjectModule) geoObject.getFirstModule(GoogleMapGeoObjectModule.class));
 }