on Scale
open fun onScale(mapboxCarMapSurface: MapboxCarMapSurface, anchor: ScreenCoordinate, fromZoom: Double, toZoom: Double): Boolean
Content copied to clipboard
Allows you to implement or observe the map scale gesture handler. The surface is onAttached before this can be triggered.
Return
true when the scale call was handled, false will trigger the default handler
See also
SurfaceCallback.onScroll
for instructions to enable.
Parameters
anchor
the focus point in pixels for the zooming gesture
fromZoom
the current zoom of the Mapbox camera
mapboxCarMapSurface
loaded and ready car map surface
toZoom
the new zoom that will be set if the function returns false