@nativescript-community/ui-mapbox 7.0.1 → 7.0.2

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [7.0.2](https://github.com/nativescript-community/ui-mapbox/compare/v7.0.1...v7.0.2) (2025-10-28)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **android:** broken build ([1587e83](https://github.com/nativescript-community/ui-mapbox/commit/1587e836ecd2d500977531d8744a276183f1ff42))
11
+
6
12
  ## [7.0.1](https://github.com/nativescript-community/ui-mapbox/compare/v7.0.0...v7.0.1) (2025-10-28)
7
13
 
8
14
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nativescript-community/ui-mapbox",
3
- "version": "7.0.1",
3
+ "version": "7.0.2",
4
4
  "description": "Interactive, thoroughly customizable maps powered by vector tiles and OpenGL.",
5
5
  "main": "index",
6
6
  "typings": "index.d.ts",
@@ -55,5 +55,5 @@
55
55
  "dependencies": {
56
56
  "@nativescript-community/perms": "^3.0.4"
57
57
  },
58
- "gitHead": "c775cf24ff6f702e028f9a4fe2d562a863281eb5"
58
+ "gitHead": "b430be9b6de94048db69df9d79c0d3172661935a"
59
59
  }
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
3
+
4
+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
5
+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
6
+
7
+ </manifest>
@@ -0,0 +1,17 @@
1
+ repositories {
2
+ mavenCentral()
3
+ def MAPBOX_DOWNLOADS_TOKEN = "$System.env.MAPBOX_DOWNLOADS_TOKEN"
4
+ maven {
5
+ url 'https://api.mapbox.com/downloads/v2/releases/maven'
6
+ authentication {
7
+ basic(BasicAuthentication)
8
+ }
9
+ credentials {
10
+ // Do not change the username below.
11
+ // This should always be `mapbox` (not your username).
12
+ username = 'mapbox'
13
+ // Use the secret token you stored in gradle.properties as the password
14
+ password = MAPBOX_DOWNLOADS_TOKEN
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,102 @@
1
+ package com.nativescript.mapbox
2
+
3
+ import com.mapbox.maps.MapView
4
+ import com.mapbox.maps.plugin.animation.CameraAnimationsPlugin
5
+ import com.mapbox.maps.plugin.animation.camera
6
+ import com.mapbox.maps.plugin.annotation.annotations
7
+ import com.mapbox.maps.plugin.annotation.generated.createPointAnnotationManager
8
+ import android.util.Log
9
+
10
+ class Telemetry {
11
+ companion object {
12
+ @JvmStatic
13
+ fun setUserTelemetryRequestState(mapView: MapView, value: Boolean) {
14
+ val fakeManager = mapView.annotations.createPointAnnotationManager()
15
+ fakeManager.delegateProvider.mapAttributionDelegate.telemetry().setUserTelemetryRequestState(value)
16
+ }
17
+ }
18
+ }
19
+ class Camera {
20
+ companion object {
21
+ fun getCamera(mapView: MapView): CameraAnimationsPlugin {
22
+ return mapView.camera
23
+ }
24
+ /**
25
+ * Returns the CameraAnimationsPlugin associated with the given MapView.
26
+ *
27
+ * Once you have this object in NativeScript, you can directly call:
28
+ * camera.flyTo(...)
29
+ * camera.easeTo(...)
30
+ * camera.cancelTransitions()
31
+ */
32
+ @JvmStatic
33
+ fun flyTo(mapView: MapView, cameraOptions: com.mapbox.maps.CameraOptions, animationOptions: com.mapbox.maps.plugin.animation.MapAnimationOptions, listener: android.animation.Animator.AnimatorListener?): com.mapbox.common.Cancelable {
34
+ return mapView.camera.flyTo(cameraOptions, animationOptions, listener)
35
+ }
36
+ @JvmStatic
37
+ fun setCamera(mapView: MapView, cameraOptions: com.mapbox.maps.CameraOptions) {
38
+ mapView.mapboxMap.setCamera(cameraOptions)
39
+ }
40
+ }
41
+ }
42
+
43
+ class ViewAnnotationManager {
44
+ companion object {
45
+ @JvmStatic
46
+ fun addViewAnnotation(map: com.mapbox.maps.MapView, view: android.view.View, options: com.mapbox.maps.ViewAnnotationOptions) {
47
+ map.viewAnnotationManager.addViewAnnotation(view, options)
48
+ }
49
+ @JvmStatic
50
+ fun removeViewAnnotation(map: com.mapbox.maps.MapView, view: android.view.View) {
51
+ map.viewAnnotationManager.removeViewAnnotation(view)
52
+ }
53
+ @JvmStatic
54
+ fun updateViewAnnotation(map: com.mapbox.maps.MapView, view: android.view.View, options: com.mapbox.maps.ViewAnnotationOptions) {
55
+ map.viewAnnotationManager.updateViewAnnotation(view, options)
56
+ }
57
+ @JvmStatic
58
+ fun getViewAnnotationOptions(map: com.mapbox.maps.MapView, view: android.view.View): com.mapbox.maps.ViewAnnotationOptions? {
59
+ return map.viewAnnotationManager.getViewAnnotationOptions(view)
60
+ }
61
+ @JvmStatic
62
+ fun addOnViewAnnotationUpdatedListener(map: com.mapbox.maps.MapView, listener: com.mapbox.maps.viewannotation.OnViewAnnotationUpdatedListener) {
63
+ map.viewAnnotationManager.addOnViewAnnotationUpdatedListener(listener)
64
+ }
65
+ @JvmStatic
66
+ fun removeOnViewAnnotationUpdatedListener(map: com.mapbox.maps.MapView, listener: com.mapbox.maps.viewannotation.OnViewAnnotationUpdatedListener) {
67
+ map.viewAnnotationManager.removeOnViewAnnotationUpdatedListener(listener)
68
+ }
69
+ }
70
+ }
71
+
72
+ class Utils {
73
+ companion object {
74
+ fun getViewAnnotationManager(map: MapView): com.mapbox.maps.viewannotation.ViewAnnotationManager {
75
+ return map.viewAnnotationManager
76
+ }
77
+ // fun getCamera(map: com.mapbox.maps.MapView): com.mapbox.maps.plugin.animation.CameraAnimationsPlugin {
78
+ // return map.getPlugin("MAPBOX_CAMERA_PLUGIN_ID")
79
+ // }
80
+ // fun getTelemetry(map: com.mapbox.maps.MapView): com.mapbox.maps.module.MapTelemetry {
81
+ // return map.telemetry
82
+ // }
83
+ fun addViewAnnotation(map: com.mapbox.maps.MapView, view: android.view.View, options: com.mapbox.maps.ViewAnnotationOptions) {
84
+ map.viewAnnotationManager.addViewAnnotation(view, options)
85
+ }
86
+ fun removeViewAnnotation(map: com.mapbox.maps.MapView, view: android.view.View) {
87
+ map.viewAnnotationManager.removeViewAnnotation(view)
88
+ }
89
+ fun updateViewAnnotation(map: com.mapbox.maps.MapView, view: android.view.View, options: com.mapbox.maps.ViewAnnotationOptions) {
90
+ map.viewAnnotationManager.updateViewAnnotation(view, options)
91
+ }
92
+ fun getViewAnnotationOptions(map: com.mapbox.maps.MapView, view: android.view.View): com.mapbox.maps.ViewAnnotationOptions? {
93
+ return map.viewAnnotationManager.getViewAnnotationOptions(view)
94
+ }
95
+ fun addOnViewAnnotationUpdatedListener(map: com.mapbox.maps.MapView, listener: com.mapbox.maps.viewannotation.OnViewAnnotationUpdatedListener) {
96
+ map.viewAnnotationManager.addOnViewAnnotationUpdatedListener(listener)
97
+ }
98
+ fun removeOnViewAnnotationUpdatedListener(map: com.mapbox.maps.MapView, listener: com.mapbox.maps.viewannotation.OnViewAnnotationUpdatedListener) {
99
+ map.viewAnnotationManager.removeOnViewAnnotationUpdatedListener(listener)
100
+ }
101
+ }
102
+ }
@@ -0,0 +1,16 @@
1
+ <vector xmlns:android="http://schemas.android.com/apk/res/android"
2
+ android:width="40dp"
3
+ android:height="52dp"
4
+ android:viewportWidth="40"
5
+ android:viewportHeight="52">
6
+ <path
7
+ android:pathData="M11.25,39.063a8.75,2.188 0,1 0,17.5 0a8.75,2.188 0,1 0,-17.5 0z"
8
+ android:fillColor="#000000"
9
+ android:fillAlpha="0.3"/>
10
+ <path
11
+ android:pathData="M27.917,29.259C31.504,25.178 35,21.201 35,15C35,6.716 28.284,0 20,0C11.716,0 5,6.716 5,15C5,21.201 8.496,25.178 12.083,29.259C14.655,32.183 17.273,35.161 18.685,39.051C18.888,39.608 19.406,40 20,40C20.594,40 21.112,39.608 21.315,39.051C22.727,35.161 25.345,32.183 27.917,29.259Z"
12
+ android:fillColor="#EB252A"/>
13
+ <path
14
+ android:pathData="M25.5,15C25.5,18.038 23.038,20.5 20,20.5C16.962,20.5 14.5,18.038 14.5,15C14.5,11.962 16.962,9.5 20,9.5C23.038,9.5 25.5,11.962 25.5,15Z"
15
+ android:fillColor="#ffffff"/>
16
+ </vector>