File tree Expand file tree Collapse file tree
android/plugin/google/maps Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1796,10 +1796,12 @@ public View getInfoContents(Marker marker) {
17961796
17971797 width = (int )((double )mapView .getWidth () * (widthDouble / 100 ));
17981798 } else if (isNumeric (widthString )) {
1799- width = ( int ) Double .parseDouble (widthString );
1799+ double widthDouble = Double .parseDouble (widthString );
18001800
1801- if (width <= 1 ) { // for percentage values (e.g. 0.5 = 50%).
1802- width = mapView .getWidth () * width ;
1801+ if (widthDouble <= 1.0 ) { // for percentage values (e.g. 0.5 = 50%).
1802+ width = (int )((double )mapView .getWidth () * (widthDouble ));
1803+ } else {
1804+ width = (int )widthDouble ;
18031805 }
18041806 }
18051807
Original file line number Diff line number Diff line change @@ -385,7 +385,7 @@ -(UIView *)mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker*)marker
385385 } else if ([widthString isNumeric: widthString]) {
386386 double widthDouble = [widthString doubleValue ];
387387
388- if (widthDouble <= 1 ) {
388+ if (widthDouble <= 1.0 ) {
389389 width = (int )((double )mapView.frame .size .width * (widthDouble));
390390 } else {
391391 width = (int )widthDouble;
You can’t perform that action at this time.
0 commit comments