{"_id":"@2gis/dgis-mobile-sdk-map","_rev":"2-08cc1bcea60068775ef8db7579d17925","name":"@2gis/dgis-mobile-sdk-map","dist-tags":{"latest":"14.1.0"},"versions":{"14.0.0":{"name":"@2gis/dgis-mobile-sdk-map","version":"14.0.0","license":"SEE LICENSE IN LICENSE","_id":"@2gis/dgis-mobile-sdk-map@14.0.0","maintainers":[{"name":"artem.malko","email":"artem.malko@gmail.com"},{"name":"trufi","email":"stevemyz@gmail.com"},{"name":"lastw","email":"me@lastw.net"},{"name":"itanka9","email":"mbeloshitsky@gmail.com"},{"name":"alxart","email":"a.artemev@inbox.ru"},{"name":"vitaliy.gis","email":"vitaliy.gis@gmail.com"},{"name":"kuznetcoff","email":"mail@kuznetsov.it"},{"name":"kalyanov","email":"oleg1556@gmail.com"},{"name":"kto-to","email":"count@ngs.ru"},{"name":"mnovoseltsev","email":"m.novoselcev@2gis.ru"}],"dist":{"shasum":"cb1fc73924d160e1901375c77b163003197d163b","tarball":"https://registry.npmjs.org/@2gis/dgis-mobile-sdk-map/-/dgis-mobile-sdk-map-14.0.0.tgz","fileCount":538,"integrity":"sha512-H0LdyPYyYJghWuna+JUOmZDe11WRZvEV7w/q845g9EWTApE3jFxa3IKcnLBTSu/2fzUv9nnOC4V3zbciq84LyQ==","signatures":[{"sig":"MEYCIQDlLDaEWUW4YI94xSByRamA5V5zQTk6vhzZB/Jvat59QwIhAIj4D7Jkya3qgO9UmOlkEh8U+D2bPw9W3cXWP5tpnsJc","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":86790842},"main":"./lib/index.js","types":"./lib/types/src/index.d.ts","exports":{".":{"types":"./lib/types/src/index.d.ts","default":"./lib/index.js"},"./package.json":"./package.json"},"scripts":{"build":"tsup && tsc -p tsconfig.build.json"},"_npmUser":{"name":"mnovoseltsev","email":"m.novoselcev@2gis.ru"},"_npmVersion":"11.19.0","description":"2GIS Mobile SDK (map flavor) for React Native","directories":{},"_nodeVersion":"26.8.1","codegenConfig":{"ios":{"modulesProvider":{"NativeDgisMobileSdkModuleCxx":"DGISNativeSDKModule"}},"name":"RNDgisMobileSdkSpecs","type":"modules","android":{"javaPackageName":"ru.dgis.sdk.reactnative.specs"},"jsSrcsDir":"specs"},"_hasShrinkwrap":false,"peerDependencies":{"react":">=18.0.0","react-native":">=0.74.0","react-native-svg":">=13.0.0","react-native-safe-area-context":"^5.5.2"},"_npmOperationalInternal":{"tmp":"tmp/dgis-mobile-sdk-map_14.0.0_1788522739280_0.4325720918975129","host":"s3://npm-registry-packages-npm-production"}},"14.1.0":{"_id":"@2gis/dgis-mobile-sdk-map@14.1.0","dist":{"shasum":"57df3f29c231dffa2a7a183e121b1196709ed109","tarball":"https://registry.npmjs.org/@2gis/dgis-mobile-sdk-map/-/dgis-mobile-sdk-map-14.1.0.tgz","fileCount":538,"integrity":"sha512-zbs/xfH+uhcbKs5LndlWhA5er0xRMRaJkyZ9ec4TXMXpkILAoIOEQfZk+CM7a3L3opADuqaBikvHnIvpDDjFnQ==","signatures":[{"sig":"MEUCIBoo0ILBCbPOef6lZRzyv+wc42LzFxqzqNiSMqvBII+3AiEAot1qhuivKYyDRiDXRlVzCE6G5z/YU02JMTkRaT7cMQI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIC/df+gZVfp4nUsqsNawy+qCwGdTpoZdGYLCkWf7eXU/AiEA1ATTMXZ/b+DPT5CnxddTK5V86bkz2bp2qNEPdP9lP0c="}],"unpackedSize":86705925},"main":"./lib/index.js","name":"@2gis/dgis-mobile-sdk-map","types":"./lib/types/src/index.d.ts","exports":{".":{"types":"./lib/types/src/index.d.ts","default":"./lib/index.js"},"./package.json":"./package.json"},"license":"SEE LICENSE IN LICENSE","scripts":{"build":"tsup && tsc -p tsconfig.build.json"},"version":"14.1.0","_npmUser":{"name":"mnovoseltsev","email":"m.novoselcev@2gis.ru"},"homepage":"https://docs.2gis.com/react-native/sdk/overview","_npmVersion":"11.19.0","description":"2GIS Mobile SDK (map flavor) for React Native","directories":{},"maintainers":[{"name":"artem.malko","email":"artem.malko@gmail.com"},{"name":"trufi","email":"stevemyz@gmail.com"},{"name":"lastw","email":"me@lastw.net"},{"name":"itanka9","email":"mbeloshitsky@gmail.com"},{"name":"alxart","email":"a.artemev@inbox.ru"},{"name":"vitaliy.gis","email":"vitaliy.gis@gmail.com"},{"name":"kuznetcoff","email":"mail@kuznetsov.it"},{"name":"kalyanov","email":"oleg1556@gmail.com"},{"name":"kto-to","email":"count@ngs.ru"},{"name":"mnovoseltsev","email":"m.novoselcev@2gis.ru"}],"_nodeVersion":"26.8.1","codegenConfig":{"ios":{"modulesProvider":{"NativeDgisMobileSdkModuleCxx":"DGISNativeSDKModule"}},"name":"RNDgisMobileSdkSpecs","type":"modules","android":{"javaPackageName":"ru.dgis.sdk.reactnative.specs"},"jsSrcsDir":"specs"},"_hasShrinkwrap":false,"peerDependencies":{"react":">=18.0.0","react-native":">=0.74.0","react-native-svg":">=13.0.0","react-native-safe-area-context":"^5.5.2"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dgis-mobile-sdk-map_14.1.0_1790161516155_0.8229686494992317"}}},"time":{"created":"2026-09-04T11:52:17.395Z","modified":"2026-09-23T11:05:16.964Z","14.0.0":"2026-09-04T11:52:19.916Z","14.1.0":"2026-09-23T11:05:16.797Z"},"license":"SEE LICENSE IN LICENSE","description":"2GIS Mobile SDK (map flavor) for React Native","maintainers":[{"name":"artem.malko","email":"artem.malko@gmail.com"},{"name":"trufi","email":"stevemyz@gmail.com"},{"name":"lastw","email":"me@lastw.net"},{"name":"itanka9","email":"mbeloshitsky@gmail.com"},{"name":"alxart","email":"a.artemev@inbox.ru"},{"name":"vitaliy.gis","email":"vitaliy.gis@gmail.com"},{"name":"kuznetcoff","email":"mail@kuznetsov.it"},{"name":"kalyanov","email":"oleg1556@gmail.com"},{"name":"kto-to","email":"count@ngs.ru"},{"name":"mnovoseltsev","email":"m.novoselcev@2gis.ru"}],"readme":"# @2gis/dgis-mobile-sdk-map\n\n2GIS Mobile SDK (map flavor) for React Native.\n\n> Requires React Native **0.74+** with the **New Architecture** enabled, React **18+**.\n\n> **Warning**\n> The current version 14 is preliminary. The API may change without backward\n> compatibility in the next 14.x minor releases.\n\n## Documentation\n\n- [Overview](https://docs.2gis.com/react-native/sdk/overview)\n- [API reference](https://docs.2gis.com/react-native/sdk/reference/stable/class)\n\n## Installation\n\n```sh\nnpm install @2gis/dgis-mobile-sdk-map react-native-svg react-native-safe-area-context\n```\n\n`react-native-svg` and `react-native-safe-area-context` are peer dependencies with\nnative code. Add them to your app's own `package.json` (as above) — React Native\nautolinking only links native modules listed there, so relying on npm installing\nthem as peers is not enough and the app crashes when the map is shown.\n\n## SDK key (`dgissdk.key`)\n\nThe SDK authenticates with a key file named **`dgissdk.key`**, obtained from 2GIS.\nIt is read by name from the app bundle, so it must be added to each platform:\n\n- **Android:** `android/app/src/main/assets/dgissdk.key`\n- **iOS:** add `dgissdk.key` to the app target's **Copy Bundle Resources**\n\nThe key is bound to an application identifier. Your **Android `applicationId`** and\n**iOS bundle identifier** must match the id the key was issued for, otherwise SDK\ninitialization fails with a \"key does not match the application\" error.\n\n## Android setup\n\n1. **Add the 2GIS Maven repository** (for the native artifact) in\n   `android/build.gradle`:\n\n   ```gradle\n   allprojects {\n     repositories {\n       maven { url \"https://artifactory.2gis.dev/sdk-maven-release\" }\n     }\n   }\n   ```\n\n2. **minSdk 24+** and the New Architecture enabled (default on RN 0.76+).\n\n3. **Initialize the SDK** in `MainApplication.kt`, in `onCreate()`, before any\n   map is used:\n\n   ```kotlin\n   import ru.dgis.sdk.platform.LogLevel\n   import ru.dgis.sdk.platform.LogOptions\n   import ru.dgis.sdk.reactnative.DgisMobileSdkModule\n   import ru.dgis.sdk.reactnative.GraphicsApi\n\n   override fun onCreate() {\n     super.onCreate()\n     loadReactNative(this)\n     DgisMobileSdkModule.init(\n       application = this,\n       graphicsApi = GraphicsApi.OPEN_GL,\n       vulkanEmulatorSupportEnabled = true,\n       logOptions = LogOptions(LogLevel.INFO, LogLevel.INFO, null),\n     )\n   }\n   ```\n\n4. **Permissions** in `AndroidManifest.xml`:\n\n   ```xml\n   <uses-permission android:name=\"android.permission.INTERNET\" />\n   <uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />\n   <uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" />\n   <uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" />\n   ```\n\n## iOS setup\n\n1. **Deployment target iOS 16.0** — set `platform :ios, '16.0'` in the `Podfile`\n   and the app target's deployment target to 16.0.\n\n2. In the `Podfile` `post_install`, apply these build settings to all pods:\n\n   ```ruby\n   installer.pods_project.targets.each do |target|\n     target.build_configurations.each do |config|\n       config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0'\n       config.build_settings['CLANG_ENABLE_EXPLICIT_MODULES'] = 'NO'\n       config.build_settings['SWIFT_ENABLE_EXPLICIT_MODULES'] = 'NO'\n     end\n   end\n   ```\n\n3. Install pods (autolinks the SDK):\n\n   ```sh\n   cd ios && pod install\n   ```\n\n4. Add `dgissdk.key` to the app target's **Copy Bundle Resources** (see above).\n\n5. Add an `NSLocationWhenInUseUsageDescription` string to `Info.plist`.\n\nNo `AppDelegate` initialization is required — the iOS module initializes itself.\n\n## Usage\n\n```tsx\nimport {useMemo} from 'react';\nimport {\n  DGis,\n  DgisSource,\n  MapControllerOptions,\n  MapView,\n  useMapController,\n} from '@2gis/dgis-mobile-sdk-map';\n\nfunction Map() {\n  // Uses the bundled `dgissdk.key` by default.\n  const context = useMemo(() => DGis.createContext(), []);\n  const options = useMemo(\n    () =>\n      new MapControllerOptions({\n        sources: [DgisSource.createDgisSource(context)],\n      }),\n    [context],\n  );\n\n  const controllerState = useMapController(context, options);\n  return <MapView controllerState={controllerState} style={{flex: 1}} />;\n}\n```\n","readmeFilename":"README.md","homepage":"https://docs.2gis.com/react-native/sdk/overview"}