Page 1 of 1

directions between two places

Posted: Sun May 31, 2015 9:28 am
by Asmaa AlHammadi

Hello,

I found a java script that shows directions on the map

var sourceAddress = Apperyio("from").val();
var destinationAddress = Apperyio("to").val();
displayDirections(sourceAddress, destinationAddress, map);

from this tutorial https://devcenter.appery.io/tutorials...

but I stored the two location in variables by set storage and then set property for the map
two variables for current location ( longitude and latitude) and two for the second location (longitude and latitude)
I want to show the directions between the two places

I changed the code to
var sourceAddress = Apperyio.storage.storageVariable.get("$['temp']['temp2']").val();
var destinationAddress = Apperyio.storage.storageVariable.get("$['markerlat']['markerlng']").val();
displayDirections(sourceAddress, destinationAddress, map);

but it doesnt work with me
can someone help me pls, because I need it for my project

thank you,
asmaa


directions between two places

Posted: Mon Jun 01, 2015 11:05 am
by khazin Mushtaq

directions between two places

Posted: Mon Jun 01, 2015 11:39 am
by Asmaa AlHammadi

this link is same tutorial https://devcenter.appery.io/tutorials
I need to show directions for data that stored in variables
not for input


directions between two places

Posted: Mon Jun 01, 2015 1:40 pm
by Alena Prykhodko

Asmaa, let's continue in one thread https://getsatisfaction.com/apperyio/...


directions between two places

Posted: Mon Jun 01, 2015 2:09 pm
by Asmaa AlHammadi

sorry for that
because I need the answer as soon as possible

and thank you