com.google.android.maps
Interface Overlay.Snappable

All Known Implementing Classes:
ItemizedOverlay, MyLocationOverlay
Enclosing class:
Overlay

public static interface Overlay.Snappable

Interface definition for overlays that contain items that can be snapped to (for example, when the user invokes a zoom, this could be called allowing the user to snap the zoom to an interesting point.)


Method Summary
 boolean onSnapToItem(int x, int y, android.graphics.Point snapPoint, MapView mapView)
          Checks to see if the given x and y are close enough to an item resulting in snapping the current action (e.g.
 

Method Detail

onSnapToItem

boolean onSnapToItem(int x,
                     int y,
                     android.graphics.Point snapPoint,
                     MapView mapView)
Checks to see if the given x and y are close enough to an item resulting in snapping the current action (e.g. zoom) to the item.

Parameters:
x - The x in screen coordinates.
y - The y in screen coordinates.
snapPoint - To be filled with the the interesting point (in screen coordinates) that is closest to the given x and y. Can be untouched if not snapping.
mapView - The MapView that is requesting the snap. Use MapView.getProjection() to convert between on-screen pixels and latitude/longitude pairs.
Returns:
Whether or not to snap to the interesting point.