(Browser) fix: GeocoderResult.extra.lines filed is incorrect parent
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.4.5-beta-20180921-1220" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
+<plugin id="cordova-plugin-googlemaps" version="2.4.5-beta-20180923-1940" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<name>cordova-plugin-googlemaps</name>
<js-module name="Promise" src="www/Promise.js" />
<asset src="www/promise-7.0.4.min.js.map" target="promise-7.0.4.min.js.map" />

MODIFY
src/browser/PluginGeocoder.js
src/browser/PluginGeocoder.js
@@ -62,13 +62,25 @@ QUEUE.on('next', function() {
'lat': geocoderResult.geometry.location.lat(),
'lng': geocoderResult.geometry.location.lng()
},
+ extra: {
lines: []
+ }
};
+ if (geocoderResult.place_id) {
+ result.extra.place_id = geocoderResult.place_id;
+ }
+ if (geocoderResult.plus_code) {
+ result.extra.plus_code = geocoderResult.plus_code;
+ }
+ if (geocoderResult.types) {
+ result.extra.types = geocoderResult.types;
+ }
+
var administrative_area = [];
var sublocality_area = [];
var idx;
geocoderResult.address_components.forEach(function(addrComp) {
- result.lines.push(addrComp.long_name);
+ result.extra.lines.push(addrComp.long_name);
if (!result.locality && addrComp.types.indexOf("locality") > -1) {
result.locality = addrComp.short_name;
}

(Browser) fix: GeocoderResult.extra.lines filed is incorrect parent https://github.com/ionic-team/ionic-native-google-maps/issues/84