@nativescript-community/ui-mapbox 7.0.10 → 7.0.12

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,18 @@
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.12](https://github.com/nativescript-community/ui-mapbox/compare/v7.0.11...v7.0.12) (2025-11-12)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **ios:** marker anchor fix ([d087251](https://github.com/nativescript-community/ui-mapbox/commit/d0872511ce9b17e9f52e2ee67c2add6d7ab0a5cd))
11
+
12
+ ## [7.0.11](https://github.com/nativescript-community/ui-mapbox/compare/v7.0.10...v7.0.11) (2025-11-07)
13
+
14
+ ### Bug Fixes
15
+
16
+ * **android:** use ndk27 of mapbox lib to support 16KB ([e709baf](https://github.com/nativescript-community/ui-mapbox/commit/e709baf3d29d4d21a68b634ab23fdc62a91e77e0))
17
+
6
18
  ## [7.0.10](https://github.com/nativescript-community/ui-mapbox/compare/v7.0.9...v7.0.10) (2025-11-04)
7
19
 
8
20
  **Note:** Version bump only for package @nativescript-community/ui-mapbox
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nativescript-community/ui-mapbox",
3
- "version": "7.0.10",
3
+ "version": "7.0.12",
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": "c43922d8db0e76946ab89655313a4acfc34a0d81"
58
+ "gitHead": "594cf940edc6d9adc7944567379a2d42b871b231"
59
59
  }
@@ -18,7 +18,7 @@ repositories {
18
18
 
19
19
  // see https://www.mapbox.com/android-sdk/
20
20
  dependencies {
21
- def mapboxVersion = project.hasProperty("mapboxVersion") ? project.mapboxVersion : "11.15.3"
21
+ def mapboxVersion = project.hasProperty("mapboxVersion") ? project.mapboxVersion : "11.16.2"
22
22
  def mapboxServicesVersion = project.hasProperty("mapboxServicesVersion") ? project.mapboxServicesVersion : "7.8.0"
23
23
  def mapboxPluginsVersion = project.hasProperty("mapboxPluginsVersion") ? project.mapboxPluginsVersion : "v9"
24
24
  def mapboxAnnotationPluginVersion = project.hasProperty("mapboxAnnotationPluginVersion") ? project.mapboxAnnotationPluginVersion : "0.9.0"
@@ -26,8 +26,8 @@ dependencies {
26
26
 
27
27
  println "com.mapbox.maps:android:$mapboxVersion"
28
28
 
29
- // Core Mapbox Maps SDK v11+
30
- implementation "com.mapbox.maps:android:$mapboxVersion"
29
+ // Core Mapbox Maps SDK v11+. For now use ndk27 to support 16Kb
30
+ implementation "com.mapbox.maps:android-ndk27:$mapboxVersion"
31
31
 
32
32
  // GeoJSON / Annotations support (choose correct module name & version)
33
33
  implementation "com.mapbox.mapboxsdk:mapbox-sdk-geojson:$mapboxServicesVersion" // example version
@@ -125,6 +125,8 @@ public class MapboxBridge: NSObject {
125
125
  private var imageRegistry: [String: UIImage] = [:]
126
126
  private var viewAnnotationByMarkerId: [String: ViewAnnotation] = [:]
127
127
 
128
+ private var defaultPinImageHeight: CGFloat = 0
129
+
128
130
  // Camera handling
129
131
  private var cameraIdleWorkItem: DispatchWorkItem?
130
132
  private var cameraChangeCallback: (([String: Any]) -> Void)? = nil
@@ -201,8 +203,11 @@ public class MapboxBridge: NSObject {
201
203
 
202
204
  // Register this bridge for the created MapView
203
205
  MapboxBridge.registerBridge(self, for: mv)
204
-
205
- addImage("default_pin", UIImage(named: "default_pin"))
206
+ let defaultPinImage = UIImage(named: "default_pin")
207
+ if (defaultPinImage != nil) {
208
+ self.defaultPinImageHeight = defaultPinImage!.size.height
209
+ addImage("default_pin", defaultPinImage)
210
+ }
206
211
 
207
212
  if let options = optionsOpt {
208
213
  if ((options["hideLogo"] as? Bool) == true) {
@@ -456,7 +461,7 @@ public class MapboxBridge: NSObject {
456
461
  else { theId = String(NSDate().timeIntervalSince1970) }
457
462
  }
458
463
  var pa = PointAnnotation(id:theId! , coordinate: CLLocationCoordinate2D(latitude: lat, longitude: lng))
459
-
464
+ pa.iconAnchor = .bottom
460
465
  // userInfo
461
466
  var userInfo = JSONObject()
462
467
 
@@ -544,8 +549,8 @@ public class MapboxBridge: NSObject {
544
549
  annotation.allowOverlap = true
545
550
  annotation.allowOverlapWithPuck = true
546
551
  let image = an.image
547
- let imageHeight = image?.image.size.height ?? 0
548
- let offsetY = imageHeight/2 + 5
552
+ let imageHeight = image?.image.size.height ?? self.defaultPinImageHeight
553
+ let offsetY = imageHeight + 5
549
554
  // TODO: variableAnchors is broken for now if multiple
550
555
  annotation.variableAnchors = [ViewAnnotationAnchorConfig(anchor: .bottom, offsetY: offsetY)
551
556
  // , ViewAnnotationAnchorConfig(anchor: .bottomLeft, offsetY: offsetY), ViewAnnotationAnchorConfig(anchor: .bottomRight, offsetY: offsetY)