Skip to main content

React Native SDK

React Native SDK allows you to add an 2GIS map to your React Native application. Using the SDK, you can display a map on the screen, get information about map objects, build routes, use the navigator, and work with offline data.

See SDK usage examples in the Examples section.

Geodata complies with OGC standards.

You can use React Native SDK on devices with iOS and Android operating systems.

warning

The current version 14.0.0 is preliminary. The API may change without backward compatibility in the next 14.x minor releases.

SDK versions

In the first release, the React Native SDK package is available in the Map version (@2gis/dgis-mobile-sdk-map). This lightweight version allows you to:

  • Add a map to the application and manage it: add markers and geometric shapes, control the camera movement, display layers, work with map style attributes, and so on.
  • Search for objects in the directory: organizations, buildings, places, and others.

The Full version, which supports navigation and offline data, will be available in future releases.

API for SDK operation

Depending on the required features, the SDK requires access keys for the maps, search, and navigation APIs. Available features depend on the SDK version: Full or Map.

When you use a key, only access to used APIs is paid based on the number of sent requests and received responses. You can work with keys in the Platform Manager.

Map

For more information on the available features, see the Map instruction.

Feature
APIs
Creating a map in the application
(MapView component, MapController and MapControllerOptions classes)
Displaying traffic jams on the map
(TrafficSource class)
Regions API
Displaying floor plans of buildings
(IndoorManager class)
Places API (access to floor plans is available on demand and for an extra cost)

Directory

For more information on the available features, see the Directory instruction.

Feature
APIs
Creating a search engine
(SearchManager class)
Regions API
Getting search results
(SearchManager.search() method)
Access to certain information about objects is only available with additional key configuration for an extra fee: see the Object data structure section.
Searching for objects in the directory by ID
(SearchManager.searchByIds() and SearchManager.searchByDirectoryObjectIds() methods)
Building search suggestions
(SearchManager.suggest() method)
Suggest API

System requirements

iOS 16 and later / iPadOS 16 and later.

Deployment options

  • Cloud-based: React Native SDK is available in the 2GIS cloud infrastructure.
  • On-Premise: React Native SDK availability when the 2GIS API Platform is installed in a private network depends on the React Native SDK version and the enabled API Platform services.

For more information, see the API Platform for the server section.

Support

  • If you have any questions while working with React Native SDK, ask the AI assistant (in the lower-right corner of the website), use the documentation search, or send an email to api@2gis.ru.

  • If you would like to discuss the capabilities of React Native SDK or its integration with your product, please contact a manager.