-
Notifications
You must be signed in to change notification settings - Fork 14
Map UI settings
To change compass related settings:
To enable or disable the compass:
mapmyIndiaMap.getUiSettings().setCompassEnabled(true);mapmyIndiaMap?.uiSettings?.isCompassEnabled = trueTo enable or disable fading of the compass when facing north:
mapmyIndiaMap.getUiSettings().setCompassFadeFacingNorth(true);mapmyIndiaMap?.uiSettings?.setCompassFadeFacingNorth(true)To set the gravity of compass view:
mapmyIndiaMap.getUiSettings().setCompassGravity(Gravity.TOP);mapmyIndiaMap?.uiSettings?.compassGravity = Gravity.TOPTo set the margin of compass view:
mapmyIndiaMap.getUiSettings().setCompassMargins(left, top, right, bottom);mapmyIndiaMap?.uiSettings?.setCompassMargins(left, top, right, bottom)To enable or disable zoom on double tap:
mapmyIndiaMap.getUiSettings().setDoubleTapGesturesEnabled(false);mapmyIndiaMap?.uiSettings?.isDoubleTapGesturesEnabled = falseTo change the positions of logo:
To set the gravity of Logo view:
mapmyIndiaMap.getUiSettings().setLogoGravity(Gravity.TOP);mapmyIndiaMap?.uiSettings?.logoGravity = Gravity.TOPTo set the margins of Logo view
mapmyIndiaMap.getUiSettings().setLogoMargins(left, top, right, bottom);mapmyIndiaMap?.uiSettings?.setLogoMargins(left, top, right, bottom)To enable or disable the map rotation:
mapmyIndiaMap.getUiSettings().setRotateGesturesEnabled(false);mapmyIndiaMap?.uiSettings?.isRotateGesturesEnabled = falseTo enable or disable the map scrolling:
mapmyIndiaMap.getUiSettings().setScrollGesturesEnabled(false);mapmyIndiaMap?.uiSettings?.isScrollGesturesEnabled = falseTo enable or disable map tilt:
mapmyIndiaMap.getUiSettings().setTiltGesturesEnabled(false);mapmyIndiaMap?.uiSettings?.isTiltGesturesEnabled = falseTo enable or disable zoom gesture
mapmyIndiaMap.getUiSettings().setZoomGesturesEnabled(false);mapmyIndiaMap?.uiSettings?.isZoomGesturesEnabled = falseMap will fail with following error codes
- MAPS_SDK_KEY_MISSING=1; //when map sdk key is not passed
- REST_API_KEY_MISSING=2; //when rest api key is not passed
- ATLAS_CLIENT_ID_MISSING=3; //when atlas client id is not passed
- ATLAS_CLIENT_SECRET_MISSING=4; //when atlas client secret is not passed
- ATLAS_GRANT_TYPE_MISSING=5; //* //when atlas grant type is not passed
- AUTHENTICATION_FAILED=7; //when map fails to authenticate itself with MapmyIndia server
- UNKNOWN=8; // when map loading failed due to unknown error
For any queries and support, please contact:

Stack Overflow
Ask a question under the mapmyindia-api
Support
Need support? contact us!
Blog
Read about the latest updates & customer stories
© Copyright 2020. CE Info Systems Pvt. Ltd. All Rights Reserved. | Terms & Conditions.
- Map UI Settings
- Set Country Regions
- Set MapmyIndia MapStyle
- REST API Kit
- MapmyIndia GeoAnalytics
- Place Autocomple Widget
- MapmyIndia Safety Plugin
- MapmyIndia Interactive Layer
- MapmyIndia GeoFence View
- MapmyIndia Safety Strip
- MapmyIndia Place Picker
- MapmyIndia Scalebar Plugin
- ELocation Strategy
- MapmyIndia Direction Widget
- MapmyIndia Nearby Search Widget
- Version History
- Country List
