You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
peterLaurence edited this page Mar 23, 2020
·
2 revisions
This page is under construction - it isn't complete yet.
Markers APIs
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
view - View instance to be added to the TileView.
x - Relative x position the View instance should be positioned at.
y - Relative y position the View instance should be positioned at.
relativeAnchorLeft - The x-axis position of a marker will be offset by a number equal to the width of the marker multiplied by this value.
relativeAnchorTop - The y-axis position of a marker will be offset by a number equal to the height of the marker multiplied by this value.
absoluteAnchorLeft - The x-axis position of a marker will be offset by this value.
absoluteAnchorTop - The y-axis position of a marker will be offset by this value.
x - Relative x position the View instance should be positioned at.
y - Relative y position the View instance should be positioned at.
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.