@capgo/nativegeocoder 0.1.10 → 0.1.11

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.
@@ -58,8 +58,8 @@ public class NativeGeocoder {
58
58
 
59
59
  // https://developer.android.com/reference/android/location/Address.html
60
60
  JSONObject placemark = new JSONObject();
61
- placemark.put("latitude", !String.valueOf(address.getLatitude()).isEmpty() ? address.getLatitude() : "");
62
- placemark.put("longitude", !String.valueOf(address.getLongitude()).isEmpty() ? address.getLongitude() : "");
61
+ placemark.put("latitude", !String.valueOf(address.getLatitude()).isEmpty() ? address.getLatitude() : 0);
62
+ placemark.put("longitude", !String.valueOf(address.getLongitude()).isEmpty() ? address.getLongitude() : 0);
63
63
  placemark.put("countryCode", address.getCountryCode() != null ? address.getCountryCode() : "");
64
64
  placemark.put("countryName", address.getCountryName() != null ? address.getCountryName() : "");
65
65
  placemark.put("postalCode", address.getPostalCode() != null ? address.getPostalCode() : "");
@@ -126,8 +126,8 @@ public class NativeGeocoder {
126
126
  if (!latitude.isEmpty() && !longitude.isEmpty()) {
127
127
  // https://developer.android.com/reference/android/location/Address.html
128
128
  JSObject placemark = new JSObject();
129
- placemark.put("latitude", latitude);
130
- placemark.put("longitude", longitude);
129
+ placemark.put("latitude", address.getLatitude();
130
+ placemark.put("longitude", address.getLongitude());
131
131
  placemark.put("countryCode", address.getCountryCode() != null ? address.getCountryCode() : "");
132
132
  placemark.put("countryName", address.getCountryName() != null ? address.getCountryName() : "");
133
133
  placemark.put("postalCode", address.getPostalCode() != null ? address.getPostalCode() : "");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/nativegeocoder",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
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",