Flutter SDK
Flutter SDK allows you to add a 2GIS map to your application. It can be used to display the map in your layout, add custom markers to it, draw geometric shapes, calculate routes, get information about map objects, control the camera movement, and so on.
You can find usage examples in the Examples section.
Geodata complies with OGC standards.
Getting API keys
To work with SDK, you need to get the key file dgissdk.key
with the obligatory indication of the appId
of the application for which this key is created. This key will be used to connect to 2GIS servers and retrieve the geographical data, as well as to use offline and the navigator. This key is unique to the SDK and cannot be used with other 2GIS SDKs.
To obtain the key file:
- Fill in the form at dev.2gis.com.
- Add the resulting key file to the
assets
of the application.
When the key is activated, you can sign in to the Platform Manager and check the statistics of request distribution.
Installation
SDK packages are available in pub.dev
:
- Full version.
- Map version: does not provide navigation methods, route calculation, and the use of offline data.
Note
You cannot use
Full
andMap
simultaneously. It causes an assembly error.
Android
A binary artifact in the .aar
is used when building for Android. To connect correctly, add a repository with this artifact to build.gradle
of your application:
repositories {
maven {
url "https://artifactory.2gis.dev/sdk-maven-release"
}
}