-
Notifications
You must be signed in to change notification settings - Fork 41
MapView API
peterLaurence edited this page Mar 23, 2020
·
2 revisions
This page is under construction - it isn't complete yet.
addMarker | Add a marker to the the MapView. The marker can be any View. No LayoutParams are required; the View will be laid out using WRAP_CONTENT for both width and height, and positioned based on the parameters.
Params
fun MapView.addMarker(view: View, x: Double, y: Double, relativeAnchorLeft: Float = -0.5f,
relativeAnchorTop: Float = -1f, absoluteAnchorLeft: Float = 0f,
absoluteAnchorTop: Float = 0f) |
moveMarker | Moves an existing marker to another position.
Params
fun MapView.moveMarker(view: View, x: Double, y: Double) |
setMarkerTapListener | Set a MarkerTapListener for the MapView instance (rather than on a single marker view). Unlike standard touch events attached to marker View's (e.g., View.OnClickListener), MarkerTapListener.onMarkerTapEvent does not consume the touch event, so will not interfere with scrolling.
fun MapView.setMarkerTapListener(markerTapListener: MarkerTapListener) |
addCallout | Add a callout to the the MapView. 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 based on the parameters.
fun MapView.addCallout(view: View, x: Double, y: Double, relativeAnchorLeft: Float = -0.5f,
relativeAnchorTop: Float = -1f, absoluteAnchorLeft: Float = 0f,
absoluteAnchorTop: Float = 0f) |