@capacitor/google-maps
Advanced tools
@@ -17,2 +17,3 @@ import Foundation | ||
| var mapId: String? | ||
| var onViewDidLoad: (() -> Void)? | ||
@@ -38,2 +39,3 @@ private var clusterManager: GMUClusterManager? | ||
| self.view = GMapView | ||
| self.onViewDidLoad?() | ||
| } | ||
@@ -99,6 +101,8 @@ | ||
| self.mapViewController.mapId = config.mapId | ||
| self.mapViewController.onViewDidLoad = { [weak self] in | ||
| self?.finishMapConfiguration() | ||
| } | ||
| self.render() | ||
| } | ||
| func render() { | ||
@@ -112,3 +116,3 @@ DispatchQueue.main.async { | ||
| ] | ||
| self.mapViewController.cameraPosition = [ | ||
@@ -119,5 +123,5 @@ "latitude": self.config.center.lat, | ||
| ] | ||
| self.targetViewController = self.getTargetContainer(refWidth: self.config.width, refHeight: self.config.height) | ||
| if let target = self.targetViewController { | ||
@@ -128,5 +132,10 @@ target.tag = Map.MAP_TAG | ||
| target.addSubview(self.mapViewController.view) | ||
| self.mapViewController.GMapView.delegate = self.delegate | ||
| } | ||
| } | ||
| } | ||
| func finishMapConfiguration() { | ||
| DispatchQueue.main.async { | ||
| self.mapViewController.GMapView.delegate = self.delegate | ||
| if let styles = self.config.styles { | ||
@@ -217,6 +226,7 @@ do { | ||
| let width = Double((item as? UIScrollView)?.contentSize.width ?? 0) | ||
| let actualHeight = round(height / 2) | ||
| let actualHeightFloor = floor(height / 2) | ||
| let actualHeightCeil = ceil(height / 2) | ||
| let isWidthEqual = width == self.config.width | ||
| let isHeightEqual = actualHeight == self.config.height | ||
| let isWidthEqual = width == refWidth | ||
| let isHeightEqual = actualHeightFloor == refHeight || actualHeightCeil == refHeight | ||
@@ -223,0 +233,0 @@ if isWidthEqual && isHeightEqual && item.tag < self.targetViewController?.tag ?? Map.MAP_TAG { |
+3
-2
| { | ||
| "name": "@capacitor/google-maps", | ||
| "version": "7.2.0-spm-dev.1", | ||
| "version": "7.2.0", | ||
| "description": "Google maps on Capacitor", | ||
@@ -97,3 +97,4 @@ "main": "dist/plugin.cjs.js", | ||
| "@types/google.maps": "~3.58.1" | ||
| } | ||
| }, | ||
| "gitHead": "583b0e5d9c7b018558347750ac9834d78d2939bc" | ||
| } |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
885317
0.05%1
-50%