Ejemplo n.º 1
0
 public Marker(MapView mapView, final ResourceProxy resourceProxy) {
   super(resourceProxy);
   mBearing = 0.0f;
   mAlpha = 1.0f; // opaque
   mPosition = new GeoPoint(0.0, 0.0);
   mAnchorU = ANCHOR_CENTER;
   mAnchorV = ANCHOR_CENTER;
   mIWAnchorU = ANCHOR_CENTER;
   mIWAnchorV = ANCHOR_TOP;
   mDraggable = false;
   mIsDragged = false;
   mPositionPixels = new Point();
   mPanToView = true;
   mFlat = false; // billboard
   mOnMarkerClickListener = null;
   mOnMarkerDragListener = null;
   if (mDefaultIcon == null) mDefaultIcon = resourceProxy.getDrawable(bitmap.marker_default);
   mIcon = mDefaultIcon;
   if (mDefaultInfoWindow == null || mDefaultInfoWindow.mMapView != mapView) {
     // build default bubble, that will be shared between all markers using the default one:
     /* pre-aar version
     Context context = mapView.getContext();
     String packageName = context.getPackageName();
     int defaultLayoutResId = context.getResources().getIdentifier("bonuspack_bubble", "layout", packageName);
     if (defaultLayoutResId == 0)
     	Log.e(BonusPackHelper.LOG_TAG, "Marker: layout/bonuspack_bubble not found in "+packageName);
     else
     	mDefaultInfoWindow = new MarkerInfoWindow(defaultLayoutResId, mapView);
     */
     // get the default layout now included in the aar library
     mDefaultInfoWindow = new MarkerInfoWindow(R.layout.bonuspack_bubble, mapView);
   }
   setInfoWindow(mDefaultInfoWindow);
 }
 public CastLocationOverlay(
     Context context,
     OnItemGestureListener<OverlayItem> pOnItemGestureListener,
     ResourceProxy pResourceProxy) {
   super(
       new ArrayList<OverlayItem>(),
       pResourceProxy.getDrawable(ResourceProxy.bitmap.marker_default),
       pOnItemGestureListener,
       pResourceProxy);
   mContext = context;
 }
 public ItemizedOverlayWithFocus(
     final List<Item> aList,
     final OnItemGestureListener<Item> aOnItemTapListener,
     final ResourceProxy pResourceProxy) {
   this(
       aList,
       pResourceProxy.getDrawable(ResourceProxy.bitmap.marker_default),
       null,
       NOT_SET,
       aOnItemTapListener,
       pResourceProxy);
 }