@capgo/capacitor-nativegeocoder 8.0.32 → 8.0.34

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.
@@ -9,7 +9,7 @@ import com.getcapacitor.annotation.CapacitorPlugin;
9
9
  @CapacitorPlugin(name = "NativeGeocoder")
10
10
  public class NativeGeocoderPlugin extends Plugin {
11
11
 
12
- private final String pluginVersion = "8.0.32";
12
+ private final String pluginVersion = "8.0.34";
13
13
 
14
14
  private NativeGeocoder implementation = new NativeGeocoder();
15
15
 
@@ -16,7 +16,7 @@ struct NativeGeocoderOptions: Decodable {
16
16
 
17
17
  typealias ReverseGeocodeCompletionHandler = ([JSObject]?, NativeGeocoderError?) -> Void
18
18
  typealias ForwardGeocodeCompletionHandler = ([JSObject]?, NativeGeocoderError?) -> Void
19
- private static let MAX_RESULTS_COUNT = 5
19
+ private static let maxResultsCount = 5
20
20
 
21
21
  func reverseGeocode(latitude: Double, longitude: Double, call: CAPPluginCall) {
22
22
  if CLGeocoder().isGeocoding {
@@ -66,8 +66,8 @@ struct NativeGeocoderOptions: Decodable {
66
66
  let maxResultObjects = placemarks.count >= maxResults ? maxResults : placemarks.count
67
67
  var resultObj = [JSObject]()
68
68
 
69
- for i in 0..<maxResultObjects {
70
- let placemark = makePosition(placemarks[i])
69
+ for index in 0..<maxResultObjects {
70
+ let placemark = makePosition(placemarks[index])
71
71
  resultObj.append(placemark)
72
72
  }
73
73
 
@@ -161,10 +161,10 @@ struct NativeGeocoderOptions: Decodable {
161
161
  let maxResultObjects = placemarks.count >= maxResults ? maxResults : placemarks.count
162
162
  var resultObj = [JSObject]()
163
163
 
164
- for i in 0..<maxResultObjects {
165
- if let latitude = placemarks[i].location?.coordinate.latitude,
166
- let longitude = placemarks[i].location?.coordinate.longitude {
167
- let placemark = makePosition(placemarks[i])
164
+ for index in 0..<maxResultObjects {
165
+ if let latitude = placemarks[index].location?.coordinate.latitude,
166
+ let longitude = placemarks[index].location?.coordinate.longitude {
167
+ let placemark = makePosition(placemarks[index])
168
168
  resultObj.append(placemark)
169
169
  }
170
170
  }
@@ -185,7 +185,7 @@ struct NativeGeocoderOptions: Decodable {
185
185
  geocoderOptions.useLocale = options.useLocale
186
186
  geocoderOptions.defaultLocale = options.defaultLocale
187
187
  if options.maxResults > 0 {
188
- geocoderOptions.maxResults = options.maxResults > NativeGeocoder.MAX_RESULTS_COUNT ? NativeGeocoder.MAX_RESULTS_COUNT : options.maxResults
188
+ geocoderOptions.maxResults = options.maxResults > NativeGeocoder.maxResultsCount ? NativeGeocoder.maxResultsCount : options.maxResults
189
189
  } else {
190
190
  geocoderOptions.maxResults = 1
191
191
  }
@@ -7,7 +7,7 @@ import Capacitor
7
7
  */
8
8
  @objc(NativeGeocoderPlugin)
9
9
  public class NativeGeocoderPlugin: CAPPlugin, CAPBridgedPlugin {
10
- private let pluginVersion: String = "8.0.32"
10
+ private let pluginVersion: String = "8.0.34"
11
11
  public let identifier = "NativeGeocoderPlugin"
12
12
  public let jsName = "NativeGeocoder"
13
13
  public let pluginMethods: [CAPPluginMethod] = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-nativegeocoder",
3
- "version": "8.0.32",
3
+ "version": "8.0.34",
4
4
  "description": "Capacitor plugin for native forward and reverse geocoding",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -46,7 +46,8 @@
46
46
  "build": "bun run clean && bun run docgen && tsc && rollup -c rollup.config.mjs",
47
47
  "clean": "rimraf ./dist",
48
48
  "watch": "tsc --watch",
49
- "prepublishOnly": "bun run build"
49
+ "prepublishOnly": "bun run build",
50
+ "check:wiring": "node scripts/check-capacitor-plugin-wiring.mjs"
50
51
  },
51
52
  "devDependencies": {
52
53
  "@capacitor/android": "^8.0.0",