cordova-plugin-googlemaps icon indicating copy to clipboard operation
cordova-plugin-googlemaps copied to clipboard

Map.setTilt() on Android doesn't allow the tilt to be zero

Open JeffreyJamesAttenti opened this issue 10 years ago • 6 comments

I need to reset tilt programmatically and the Map.setTilt wiki page states that tilt can be between 0 and 45 degrees.

However, with Android (I have not checked iOS) setting the tilt to 0 yields an error from native code stating "Invalid tilt angle(0.0)". I looked at PluginMap.java and the check inside of setTilt() looks like this: "tilt > 0 && tilt <= 90". It should be "tilt => 0 && tilt <= 90".

JeffreyJamesAttenti avatar May 17 '16 18:05 JeffreyJamesAttenti

Got it.

wf9a5m75 avatar May 19 '16 16:05 wf9a5m75

Sorry, I forgot this issue for a while.

wf9a5m75 avatar Jun 28 '16 21:06 wf9a5m75

@meetshawn Why did you revert the patch?

wf9a5m75 avatar Sep 15 '16 18:09 wf9a5m75

@wf9a5m75 wrong person?

shawnhwei avatar Sep 19 '16 10:09 shawnhwei

@meetshawn Opps, sorry.

@mhfen Why did you revert the patch?

wf9a5m75 avatar Sep 19 '16 16:09 wf9a5m75

This is fixed perfectly in the v2-beta version. The plugin accepts tilt:0, but it's not equal with Google Maps accepts tilt 0. The plugin just passes the value to the Google Maps.

https://github.com/mapsplugin/cordova-plugin-googlemaps/blob/multiple_maps/src/ios/GoogleMaps/PluginMap.m#L311-L324

For the v2-beta, please read at here. https://github.com/mapsplugin/v2.0-demo/

wf9a5m75 avatar Oct 05 '16 18:10 wf9a5m75