Skip to content

Latest commit

 

History

History
150 lines (129 loc) · 3.79 KB

Map-UI-Settings.md

File metadata and controls

150 lines (129 loc) · 3.79 KB

MapmyIndia APIs

Map UI settings

To change compass related settings:

Enable/ Disable compass

To enable or disable the compass:

Java

mapmyIndiaMap.getUiSettings().setCompassEnabled(true);

Kotlin

mapmyIndiaMap?.uiSettings?.isCompassEnabled = true

Enable/Disable Fading of the compass when facing north

To enable or disable fading of the compass when facing north:

Java

mapmyIndiaMap.getUiSettings().setCompassFadeFacingNorth(true);

Kotlin

mapmyIndiaMap?.uiSettings?.setCompassFadeFacingNorth(true)

Gravity of Compass

To set the gravity of compass view:

Java

mapmyIndiaMap.getUiSettings().setCompassGravity(Gravity.TOP);

Kotlin

mapmyIndiaMap?.uiSettings?.compassGravity = Gravity.TOP

Margins of compass

To set the margin of compass view:

Java

mapmyIndiaMap.getUiSettings().setCompassMargins(left, top, right, bottom);

Kotlin

mapmyIndiaMap?.uiSettings?.setCompassMargins(left, top, right, bottom)

To enable or disable zoom on double tap:

Java

mapmyIndiaMap.getUiSettings().setDoubleTapGesturesEnabled(false);

Kotlin

mapmyIndiaMap?.uiSettings?.isDoubleTapGesturesEnabled = false

To change the positions of logo:

Gravity of Logo

To set the gravity of Logo view:

Java

mapmyIndiaMap.getUiSettings().setLogoGravity(Gravity.TOP);

Kotlin

mapmyIndiaMap?.uiSettings?.logoGravity = Gravity.TOP

Margin of Logo

To set the margins of Logo view

Java

mapmyIndiaMap.getUiSettings().setLogoMargins(left, top, right, bottom);

Kotlin

mapmyIndiaMap?.uiSettings?.setLogoMargins(left, top, right, bottom)

To enable or disable the map rotation:

Java

mapmyIndiaMap.getUiSettings().setRotateGesturesEnabled(false);

Kotlin

mapmyIndiaMap?.uiSettings?.isRotateGesturesEnabled = false

To enable or disable the map scrolling:

Java

mapmyIndiaMap.getUiSettings().setScrollGesturesEnabled(false);

Kotlin

mapmyIndiaMap?.uiSettings?.isScrollGesturesEnabled = false

To enable or disable map tilt:

Java

mapmyIndiaMap.getUiSettings().setTiltGesturesEnabled(false);

Kotlin

mapmyIndiaMap?.uiSettings?.isTiltGesturesEnabled = false

To enable or disable zoom gesture

Java

mapmyIndiaMap.getUiSettings().setZoomGesturesEnabled(false);

Kotlin

mapmyIndiaMap?.uiSettings?.isZoomGesturesEnabled = false

For any queries and support, please contact:

Email Email us at apisupport@mapmyindia.com

Stack Overflow Ask a question under the mapmyindia-api

Support Need support? contact us!

Blog Read about the latest updates & customer stories

© Copyright 2022. CE Info Systems Ltd. All Rights Reserved. | Terms & Conditions.