Paolo
Posts: 0
Joined: Thu Apr 12, 2012 9:51 am

Geolocation problem

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

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Geolocation problem

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

Paolo
Posts: 0
Joined: Thu Apr 12, 2012 9:51 am

Geolocation problem

Thanks, that's great

another little question:
how can I add a comand zoom (plus + and mine -) on the map?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Geolocation problem

The icons (+/-) should be there automatically:
Image

Paolo
Posts: 0
Joined: Thu Apr 12, 2012 9:51 am

Geolocation problem

no, unfortunately there isns't...
bug?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Geolocation problem

You don't have +/- when testing in desktop browser or on the phone?

Paolo
Posts: 0
Joined: Thu Apr 12, 2012 9:51 am

Geolocation problem

just on the phone

Paolo
Posts: 0
Joined: Thu Apr 12, 2012 9:51 am

Geolocation problem

I'm using tiggzi test on the phone

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Geolocation problem

Do you mean the Android app..? What if you run it in just the browse on the phone?

Paolo
Posts: 0
Joined: Thu Apr 12, 2012 9:51 am

Geolocation problem

yes Android app. Doesn't work also in just the browser

Return to “Issues”