Skip to content

MapmyIndia Interactive Layer Plugin

Saksham66 edited this page May 27, 2020 · 1 revision

MapmyIndia APIs

MapmyIndia Interactive Layer Plugin

Introduction

In the current scenario, where social distancing is paramount, technology is playing a key role in maintaining daily communication and information transfer. MapmyIndia is serving individuals, companies and the government alike, to spread critical information related to COVID-19 through deeply informative, useful and free-to-integrate geo-visualized COVID-19 Layers in your application.

Simply plug these easy-to-integrate and COVID-19 Layers into your applications, and offer a seamless information experience to your users.

Get Interactive Layers

To get all interactive layers:

Java

mapmyIndiaMap.getInteractiveLayer(new MapboxMap.InteractiveLayerLoadingListener() {  
    @Override  
    public void onLayersLoaded(List<InteractiveLayer> list) {  
  
    }  
});

Kotlin

mapmyIndiaMap?.getInteractiveLayer(object: MapboxMap.InteractiveLayerLoadingListener {  
    override fun onLayersLoaded(list: List<InteractiveLayer>?) {  
        
    }  
})

Show/ Hide Interactive Layers

To show Interactive Layers:

Java

mapmyIndiaMap.showInteractiveLayer(interactiveLayer);

Kotlin

mapmyIndiaMap?.showInteractiveLayer(interactiveLayer)

To hide Interactive Layers:

Java

mapmyIndiaMap.hideInteractiveLayer(interactiveLayer);

Kotlin

mapmyIndiaMap?.hideInteractiveLayer(interactiveLayer)

Enable/ Disable Infowindow

To Enable/Disable info window on click of Interactive Layer

Java

mapmyIndiaMap.showInteractiveLayerInfoWindow(false);

Kotlin

mapmyIndiaMap?.showInteractiveLayerInfoWindow(false)

Get Interactive Layer Details

To get the Interactive Layer Detail when clicked on Layer

Java

mapmyIndiaMap.setOnInteractiveLayerClickListener(new MapboxMap.OnInteractiveLayerClickListener() {  
    @Override  
  public void onInteractiveLayerClicked(InteractiveItemDetails interactiveItemDetails) {  
  
    }  
});

Kotlin

  
mapmyIndiaMap?.setOnInteractiveLayerClickListener(object : MapboxMap.OnInteractiveLayerClickListener {  
    override fun onInteractiveLayerClicked(interactiveItemDetails: InteractiveItemDetails?) {  
  
    }  
})

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