@rnmapbox/maps 10.0.0-rc.13 → 10.0.0-rc.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mapbox.rctmgl">
2
2
  <uses-permission android:name="android.permission.INTERNET" />
3
+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
3
4
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
4
5
  </manifest>
@@ -46,7 +46,7 @@ abstract class AbstractEventEmitter<T : ViewGroup?>(reactApplicationContext: Rea
46
46
  )
47
47
  }
48
48
 
49
- override fun addEventEmitters(context: ThemedReactContext, @Nonnull view: T) {
49
+ override fun addEventEmitters(context: ThemedReactContext, view: T) {
50
50
  mEventDispatcher = context.getNativeModule(UIManagerModule::class.java)!!.eventDispatcher
51
51
  }
52
52
 
@@ -72,4 +72,4 @@ abstract class AbstractEventEmitter<T : ViewGroup?>(reactApplicationContext: Rea
72
72
  companion object {
73
73
  private const val BRIDGE_TIMEOUT_MS = 10.0
74
74
  }
75
- }
75
+ }
@@ -14,7 +14,9 @@ import com.mapbox.rctmgl.modules.RCTMGLLocationModule
14
14
  import com.facebook.react.bridge.ReactMethod
15
15
  import com.facebook.react.common.MapBuilder
16
16
  import com.mapbox.common.*
17
+ import com.mapbox.maps.MapView
17
18
  import com.mapbox.maps.Style
19
+ import com.mapbox.maps.plugin.attribution.attribution
18
20
  import com.mapbox.rctmgl.components.camera.constants.CameraMode
19
21
  import java.util.HashMap
20
22
 
@@ -115,6 +117,15 @@ class RCTMGLModule(private val mReactContext: ReactApplicationContext) : ReactCo
115
117
  .build()
116
118
  }
117
119
 
120
+ @ReactMethod
121
+ fun setTelemetryEnabled(telemetryEnabled: Boolean) {
122
+ mReactContext.runOnUiQueueThread {
123
+ val dummyView = MapView(mReactContext)
124
+ val telemetry = dummyView.attribution.getMapAttributionDelegate().telemetry()
125
+ telemetry.userTelemetryRequestState = telemetryEnabled
126
+ }
127
+ }
128
+
118
129
  @ReactMethod
119
130
  fun setAccessToken(accessToken: String?, promise: Promise) {
120
131
  mReactContext.runOnUiQueueThread(Runnable {
@@ -287,6 +287,7 @@ class RCTMGLOfflineModule(private val mReactContext: ReactApplicationContext) :
287
287
  .minZoom(zoomRange.minZoom)
288
288
  .maxZoom(zoomRange.maxZoom)
289
289
  .stylePackOptions(stylePackOptions)
290
+ .pixelRatio(2.0f)
290
291
  .build()
291
292
  val tilesetDescriptor = offlineManager.createTilesetDescriptor(descriptorOptions)
292
293
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rnmapbox/maps",
3
3
  "description": "A Mapbox react native module for creating custom maps",
4
- "version": "10.0.0-rc.13",
4
+ "version": "10.0.0-rc.14",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },