Page 1 of 2

Marker From Local storage

Posted: Sat Aug 24, 2013 8:19 pm
by Willie Sims

can't figure out what I am doing wrong, I have created a clickable list that passes to a details page, then added a map it button on that page to go to a map page,
I can see the local storage for lat and long stored and passed to the map page

I did a on load set property , Marker , Latitude, bind to local varible and the same for name, longitude and added a button with a click event to refresh but it will not show the location


Marker From Local storage

Posted: Sat Aug 24, 2013 8:38 pm
by Alena Prykhodko

Hello Willie!

Do you have checked Show marker in the map Properties?

The following references are useful:
http://docs.appery.io/tutorials/build...
https://getsatisfaction.com/apperyio/...


Marker From Local storage

Posted: Sat Aug 24, 2013 9:02 pm
by Willie Sims

yes the marker is visible,
The issue is that I am not trying to show multiple markers only the marker corresponding to the list item
http://appery.io/app/mobile-frame?src...


Marker From Local storage

Posted: Sat Aug 24, 2013 9:33 pm
by Illya Stepanov

Hi Willie -- are you refreshing map in the end like shown here?


Marker From Local storage

Posted: Sat Aug 24, 2013 9:43 pm
by Willie Sims

Yes, I have the event set to the button click,
The set properties for Latitude and longitude bind to local storage are set to fire on screen load.
I don't get it


Marker From Local storage

Posted: Sat Aug 24, 2013 10:00 pm
by Willie Sims

Mr Stepanov
This is getting very aggravating this should be a simple deal, I can see the local storage variables are loaded and have used the set property-marker-
name, Latitude and Longitude all bound to the Local storage and then set the map it button on click event run java script code var map = Appery('Map');
map.options['address']='';
map.refresh();
/code
But all that happens is it goes back to the default location


Marker From Local storage

Posted: Sat Aug 24, 2013 10:05 pm
by maxkatz

Click the map in builder and take a screen shot for us. Make sure it includes the properties window.


Marker From Local storage

Posted: Sat Aug 24, 2013 10:21 pm
by Willie Sims

Marker From Local storage

Posted: Sat Aug 24, 2013 10:59 pm
by Willie Sims

I tried to change tack and see if this would work but still no luck
code

//get map
var map = Appery('Map');

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

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

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

//refresh map
map.refresh();
/code
set on mapit button click


Marker From Local storage

Posted: Sat Aug 24, 2013 11:20 pm
by Illya Stepanov

Willie - please check if you added a geolocation service in your app -- I can't see it's launched a location service in a browser.