It is a guide to display a user's safety status for COVID-19 on a map. It will show whether user is in a containment zone or not if yes how much is distance from current location.
Following this guide it will be possible to display user's safety status on MapmyIndia's Map in the form of a safety strip depending upon the user's current location.
A method need to be called to check safety status. SDK has inbuild view with button which can be used to call that method.
After loading of Map, a mthod can be called to get safety status. showCurrentLocationSafety is the method which helps to find user's safety status. On successfully fetching of status a safety strip will be shown on map.
mapmyIndiaMap.showCurrentLocationSafety();mapmyIndiaMap?.showCurrentLocationSafety()On successfully receiving status based on location from server, a view will be shown on map with safety information like distance, containment zone location etc.
By default safety status strip will be shown on top of map.
mapmyIndiaMap.getUiSettings().setSafetyStripGravity(Gravity.TOP);mapmyIndiaMap?.uiSettings?.safetyStripGravity = Gravity.TOPBy default margins of safety status is zero.
mapmyIndiaMap.getUiSettings().setSafetyStripMargins(left, top, right, bottom);mapmyIndiaMap?.uiSettings?.setSafetyStripMargins(left, top, right, bottom)mapmyIndiaMap.getUiSettings().hideSafetyStrip();mapmyIndiaMap?.uiSettings?.hideSafetyStrip()For any queries and support, please contact:
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.

