Tommy B
Posts: 0
Joined: Sat Sep 15, 2012 3:39 am

google map not moving to longitude and latitude in app

Arrrrrrg!!!!

I have been messing around with the google map function and cant get it to focus of the long and lat that is displayed on the screen.

First i tried to grab the info from a label that was populated from a db but even using the tiggzi ('id').text() will not work.

my second attemp has be creating a local storage var to hold the lat and long when a button is clicked. I have verified that the lat and long is in the local storage by creating an input box that is populated from the lat variable and it works.

Can you help me with what I am doing wrong?

I have sent a href="mailto:support@tiggzi.com" rel="nofollow"support@tiggzi.com/a the link to the app.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

google map not moving to longitude and latitude in app

Hello! You have to use "map.setProperty" function. Please try the next code:

//get map
var map = Tiggzi('googlemap1');

//get lat,longt
var latiTude = localStorage.getItem('varlat');
var longtiTude = localStorage.getItem('varlong');

//set new location
map.setProperty('latitude',latiTude);
map.setProperty('longitude',longtiTude);

//reset address property
map.setProperty('address','');

//refresh map
map.refresh();

Tommy B
Posts: 0
Joined: Sat Sep 15, 2012 3:39 am

google map not moving to longitude and latitude in app

First off thank you for the help. It worked perfectly. Now im trying to set the maps draggable properties to false with this;

map.setProperty('draggable','false');

Its not working. Any ideas?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

google map not moving to longitude and latitude in app

Hello! Tiggzi doesn't support this property now. You can try to create component custom html component with settings for Google map (in Panel component) or try this code Tiggzi("googlemap1").gmap.set("draggable",false);

Return to “Issues”