hansemannn / titanium-googlemaps

🗺 Use the Google Maps SDK in Titanium
Other
87 stars 26 forks source link

Allow rotation change in Annotation.updateLocation #92

Closed mcongrove closed 7 years ago

mcongrove commented 7 years ago

Would it be possible to allow annotation rotation to be changed from within the updateLocation method, rather than just lat/lon?

hansemannn commented 7 years ago

Added https://github.com/hansemannn/titanium-google-maps/pull/93, try it out!

yozef commented 7 years ago

You should find this feature in 3.6.0.

annotation.updateLocation({
    // Required
    latitude: 36.368122,
    longitude: -125.913653, 

    // Optional
    animated: true,
    duration: 1000 // in MS, default: 2000
    opacity: 0.5,
    rotation: 30 // in degrees, clockwise from the default position
});

https://github.com/hansemannn/titanium-google-maps/releases/tag/v3.6.0

hansemannn commented 7 years ago

Thanks @yozef for the review!

mcongrove commented 7 years ago

You may want to point out in the docs that this only works if animated: true is set. That confused me for a bit!

hansemannn commented 7 years ago

Whoops, forgot about that. https://github.com/hansemannn/titanium-google-maps/pull/94 will take care of that.

hansemannn commented 7 years ago

@mcongrove New release drafted ~ https://github.com/hansemannn/titanium-google-maps/releases/tag/v3.6.1-beta.1