Exemple #1
0
 /**
  * Add a callout to the the TileView. The callout can be any View. No LayoutParams are required;
  * the View will be laid out using WRAP_CONTENT for both width and height, and positioned
  * according to the x and y values supplied. Callout views will always be positioned at the top of
  * the view tree (at the highest z-index), and will always be removed during any touch event that
  * is not consumed by the callout View.
  *
  * @param view View instance to be added to the TileView.
  * @param x Relative x position the View instance should be positioned at.
  * @param y Relative y position the View instance should be positioned at.
  * @param anchorX The x-axis position of a callout view will be offset by a number equal to the
  *     width of the callout view multiplied by this value.
  * @param anchorY The y-axis position of a callout view will be offset by a number equal to the
  *     height of the callout view multiplied by this value.
  * @return The View instance added to the TileView.
  */
 public View addCallout(View view, double x, double y, Float anchorX, Float anchorY) {
   return mCalloutLayout.addMarker(
       view,
       mCoordinateTranslater.translateX(x),
       mCoordinateTranslater.translateY(y),
       anchorX,
       anchorY);
 }
Exemple #2
0
 @Override
 public void onScaleChanged(float scale, float previous) {
   super.onScaleChanged(scale, previous);
   mDetailLevelManager.setScale(scale);
   mHotSpotManager.setScale(scale);
   mTileCanvasViewGroup.setScale(scale);
   mScalingLayout.setScale(scale);
   mCompositePathView.setScale(scale);
   mMarkerLayout.setScale(scale);
   mCalloutLayout.setScale(scale);
 }
Exemple #3
0
 /**
  * Removes a callout View from the TileView.
  *
  * @param view The callout View to be removed.
  */
 public void removeCallout(View view) {
   mCalloutLayout.removeMarker(view);
 }