npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dgis-mobile-sdk-map

v14.0.0-alpha.1

Published

2GIS Mobile SDK (map flavor) for React Native

Readme

dgis-mobile-sdk-map

2GIS Mobile SDK (map flavor) for React Native.

Requires React Native 0.74+ with the New Architecture enabled, React 18+.

Installation

npm install dgis-mobile-sdk-map

SDK key (dgissdk.key)

The SDK authenticates with a key file named dgissdk.key, obtained from 2GIS. It is read by name from the app bundle, so it must be added to each platform:

  • Android: android/app/src/main/assets/dgissdk.key
  • iOS: add dgissdk.key to the app target's Copy Bundle Resources

The key is bound to an application identifier. Your Android applicationId and iOS bundle identifier must match the id the key was issued for, otherwise SDK initialization fails with a "key does not match the application" error.

Android setup

  1. Add the 2GIS Maven repository (for the native artifact) in android/build.gradle:

    allprojects {
      repositories {
        maven { url "https://artifactory.2gis.dev/sdk-maven-snapshot" }
      }
    }
  2. minSdk 24+ and the New Architecture enabled (default on RN 0.76+).

  3. Initialize the SDK in MainApplication.kt, in onCreate(), before any map is used:

    import ru.dgis.sdk.platform.LogLevel
    import ru.dgis.sdk.platform.LogOptions
    import ru.dgis.sdk.reactnative.DgisMobileSdkModule
    import ru.dgis.sdk.reactnative.GraphicsApi
    
    override fun onCreate() {
      super.onCreate()
      loadReactNative(this)
      DgisMobileSdkModule.init(
        application = this,
        graphicsApi = GraphicsApi.OPEN_GL,
        vulkanEmulatorSupportEnabled = true,
        logOptions = LogOptions(LogLevel.INFO, LogLevel.INFO, null),
      )
    }
  4. Permissions in AndroidManifest.xml:

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

iOS setup

  1. Deployment target iOS 16.0 — set platform :ios, '16.0' in the Podfile and the app target's deployment target to 16.0.

  2. In the Podfile post_install, apply these build settings to all pods:

    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0'
        config.build_settings['CLANG_ENABLE_EXPLICIT_MODULES'] = 'NO'
        config.build_settings['SWIFT_ENABLE_EXPLICIT_MODULES'] = 'NO'
      end
    end
  3. Install pods (autolinks the SDK):

    cd ios && pod install
  4. Add dgissdk.key to the app target's Copy Bundle Resources (see above).

  5. Add an NSLocationWhenInUseUsageDescription string to Info.plist.

No AppDelegate initialization is required — the iOS module initializes itself.

Usage

import {
  DGis,
  DgisSource,
  MapController,
  MapControllerOptions,
  MapView,
} from 'dgis-mobile-sdk-map';

// Uses the bundled `dgissdk.key` by default.
const context = DGis.createContext();

const options = new MapControllerOptions({
  sources: [DgisSource.createDgisSource(context)],
});

MapController.create(context, options).onComplete(
  controller => {
    // Render: <MapView mapController={controller} style={{ flex: 1 }} />
  },
  error => console.warn(error),
);