Page 1 of 2
Geolocation problem
Posted: Thu May 10, 2012 2:52 pm
by Paolo
Hi,
I have 2 pages:
-in the first page there is a geolocaion service and the latitude and longitude are save in 2 local storage variableand a button to navigate in the second page
-in the second page there is a google map and 2 Set property for the latitude and longitude variable in the "DeviceReady" event
so I'd like show in the second page the marker position with the cordinates saved in the firt page but I don't see anything...the marker is always in the centre map with the default cordinates but if I refresh the second page I look the right cordinates of the marker but just if I refresh page
Do you know what i mean? what's the problem?
thanks
Paolo
Geolocation problem
Posted: Thu May 10, 2012 3:49 pm
by maxkatz
You can use Load page event and run this JavaScript to update the map:
code
var map = Tiggr('map_id');
map.options['latitude'] = localStorage.getItem('latitude_key');
map.options['longitude'] = localStorage.getItem('longitude_key');
map.options['address'] = '';
map.refresh();
/code
Geolocation problem
Posted: Thu May 10, 2012 5:20 pm
by Paolo
Thanks, that's great
another little question:
how can I add a comand zoom (plus + and mine -) on the map?
Geolocation problem
Posted: Thu May 10, 2012 5:39 pm
by maxkatz
The icons (+/-) should be there automatically:
Geolocation problem
Posted: Thu May 10, 2012 9:42 pm
by Paolo
no, unfortunately there isns't...
bug?
Geolocation problem
Posted: Fri May 11, 2012 12:18 am
by maxkatz
You don't have +/- when testing in desktop browser or on the phone?
Geolocation problem
Posted: Fri May 11, 2012 8:28 am
by Paolo
Geolocation problem
Posted: Fri May 11, 2012 8:29 am
by Paolo
I'm using tiggzi test on the phone
Geolocation problem
Posted: Fri May 11, 2012 8:53 am
by maxkatz
Do you mean the Android app..? What if you run it in just the browse on the phone?
Geolocation problem
Posted: Fri May 11, 2012 9:08 am
by Paolo
yes Android app. Doesn't work also in just the browser