Android WebGL SDK Обзор | 2GIS Documentation

Overview

2GIS Android MapGL is an SDK that allows you to add a 2GIS map to your Android application. It can be used to display the map in your layout, add custom markers to it, and highlight various objects on the map, such as buildings, roads, and others.

This SDK uses Android WebView to render the map. If you need a more native solution (for example, if you don't want to display web content inside your app or if you need to support older versions of Android), take a look at Android Native SDK.

Usage of this SDK requires an API key to connect to 2GIS servers and retrieve the geographical data. This API key is unique to the SDK and cannot be used with other 2GIS SDKs.

To obtain the key, contact us at mapgl@2gis.com.

To install the SDK:

  1. Declare a custom repository in your build.gradle file:
repositories {
    maven {
     url "https://dl.bintray.com/2gis/maven"
    }
}
  1. Add a build dependency:
dependencies {
    implementation 'ru.dublgis.dgismobile.mapsdk:mapsdk:latest.release'
}

After that, you should be good to go. Check the Examples section to see how to display the map in your application. Alternatively, check the API Reference to learn more about specific classes and methods.

2GIS Android MapGL is licensed under the BSD 2-Clause "Simplified" License. See the LICENSE file for more information.