public static interface Overlay.Snappable
Modifier and Type | Method and Description |
---|---|
boolean |
onSnapToItem(int x,
int y,
Point snapPoint,
IMapView mapView)
Checks to see if the given x and y are close enough to an item resulting in snapping the
current action (e.g.
|
boolean onSnapToItem(int x, int y, Point snapPoint, IMapView mapView)
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.