Fix: plugin/google/maps/MyPluginLayout.java:463: error: incompatible types: Object cannot be converted to int
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.3.0-beta-20180406-1845" 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.3.0-beta-20180408-1032" 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="BaseClass" src="www/BaseClass.js">
<runs />

MODIFY
src/android/plugin/google/maps/MyPluginLayout.java
src/android/plugin/google/maps/MyPluginLayout.java
@@ -460,7 +460,7 @@ public class MyPluginLayout extends FrameLayout implements ViewTreeObserver.OnSc
if (view.getTag() == null) {
continue;
}
- if ((int)view.getTag() < depth) {
+ if (Integer.parseInt(view.getTag() + "") < depth) {
index = i;
break;
}

MODIFY
src/android/plugin/google/maps/PluginStreetViewPanorama.java
src/android/plugin/google/maps/PluginStreetViewPanorama.java
@@ -370,7 +370,7 @@ public class PluginStreetViewPanorama extends MyPlugin implements
JSONObject position = new JSONObject();
position.put("lat", streetViewPanoramaLocation.position.latitude);
position.put("lng", streetViewPanoramaLocation.position.longitude);
- location.put("position", position);
+ location.put("latLng", position);
JSONArray links = new JSONArray();
for (StreetViewPanoramaLink stLink : streetViewPanoramaLocation.links) {

MODIFY
src/ios/GoogleMaps/CordovaGoogleMaps.m
src/ios/GoogleMaps/CordovaGoogleMaps.m
rect = CGRectFromString([domInfo objectForKey:@"size"]);
}
}
- NSLog(@"--->rect = %f x %f", rect.size.width, rect.size.height);
panoramaCtrl.panoramaView = [GMSPanoramaView panoramaWithFrame:rect nearCoordinate: CLLocationCoordinate2DMake(0, 0)];
panoramaCtrl.view = panoramaCtrl.panoramaView;

MODIFY
src/ios/GoogleMaps/MyPluginScrollView.m
src/ios/GoogleMaps/MyPluginScrollView.m
UIView *subview;
NSInteger tag;
int viewCnt = (int)[subviews count];
- int index = 0;
+ int index = viewCnt;
for (int i = 0; i < viewCnt; i++) {
subview = [subviews objectAtIndex: i];
tag = subview.tag;

MODIFY
src/ios/GoogleMaps/PluginStreetViewPanoramaController.m
src/ios/GoogleMaps/PluginStreetViewPanoramaController.m
NSMutableDictionary *target = [NSMutableDictionary dictionary];
[target setObject:[NSNumber numberWithDouble:coordinate.latitude] forKey:@"lat"];
[target setObject:[NSNumber numberWithDouble:coordinate.longitude] forKey:@"lng"];
- [location setObject:target forKey:@"position"];
+ [location setObject:target forKey:@"latLng"];
NSMutableArray *links = [NSMutableArray array];
for (GMSPanoramaLink *linkRef in self.panoramaView.panorama.links) {

MODIFY
www/StreetViewPanorama.js
www/StreetViewPanorama.js
@@ -274,7 +274,7 @@ StreetViewPanorama.prototype._onPanoramaLocationChange = function(eventName, pan
var self = this;
self.set('location', panoramaLocation);
self.set('pano', panoramaLocation.panoId);
- self.set('position', panoramaLocation.position);
+ self.set('position', panoramaLocation.latLng);
if (self._isReady) {
self._onPanoramaEvent(eventName, panoramaLocation);
}

Fix: plugin/google/maps/MyPluginLayout.java:463: error: incompatible types: Object cannot be converted to int #2204