hansemannn / titanium-googlemaps

🗺 Use the Google Maps SDK in Titanium

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RegionChaned event callback

adelsamy opened this issue · comments

Hi ,
Thanks for help us to use your amazing module
i'm already using the regionchaned event to return long and lat delta , but this event return the longitude not delta

here is debug result
regionchanged event

{
    bubbles = 1;

[INFO] :       cancelBubble = 0;
[INFO] :       latitude = "45.15274979174137";
[INFO] :       longitude = "45.15274979174137";
[INFO] :       map = "[object TiGooglemapsView]";
[INFO] :       source = "[object TiGooglemapsView]";
[INFO] :       type = regionchanged;
[INFO] :  
 }

idle event


 {
[WARN] :       bearing = 0;
[WARN] :       bubbles = 1;
[WARN] :       cancelBubble = 0;
[WARN] :       latitude = "23.87846346925502";
[WARN] :       longitude = "45.15274979174137";
[WARN] :       source = "[object TiGooglemapsView]";
[WARN] :       type = idle;
[WARN] :       viewingAngle = 0;
[WARN] :       zoom = "6.116298675537109";
[WARN] :   }

Thanks for Advance.

Hey there! The latitudeDelta/longitudeDelta are not exposed, yet. I'm not even sure GoogleMaps exposes it directly.

Checked it. It does not expose it, but you can calculate it by using the last location and the new location in addition to the zoom level. Google has some SO-threads which help there. Thanks!