Skip to content

MapmyIndia Safety Strip

Saksham66 edited this page Sep 10, 2020 · 1 revision

MapmyIndia APIs

COVID-19 Safety Status on MapmyIndia's Map

Introduction

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.

Getting Started

Get Safety Status

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.

Java

mapmyIndiaMap.showCurrentLocationSafety();

Kotlin

mapmyIndiaMap?.showCurrentLocationSafety()

Safety Strip

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.

Safety Strip Position

By default safety status strip will be shown on top of map.

Java

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

Kotlin

mapmyIndiaMap?.uiSettings?.safetyStripGravity = Gravity.TOP

Safety Strip Margins

By default margins of safety status is zero.

Java

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

Kotlin

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

Hide Safety Status

Java

mapmyIndiaMap.getUiSettings().hideSafetyStrip();

Kotin

mapmyIndiaMap?.uiSettings?.hideSafetyStrip()

For any queries and support, please contact:

Email
Email us at [email protected]


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.

Clone this wiki locally