Page 1 of 2

How do I make an app that gives me directions from my location and takes me to a unchangeable location

Posted: Sat Sep 07, 2013 11:46 pm
by Andres Tame

I am using the tutorial on how to make a directions app but I need it to use my current location and take me to my business.


How do I make an app that gives me directions from my location and takes me to a unchangeable location

Posted: Sun Sep 08, 2013 1:03 am
by Illya Stepanov

Hello - for create such an app, you will need:

ul
lito use a Geolocation service/li

  • get current coordinates and save them;

  • define the destination adress (there are several approaches for a static adress: you can store this data in a database or define it as a local storage);

    lithen you need to pass these coordinates (current and destination) to the Google Directions service -- as variables for sourceAddress and destinationAddress in this part/li

    /ul


How do I make an app that gives me directions from my location and takes me to a unchangeable location

Posted: Sun Sep 08, 2013 1:30 am
by Andres Tame

Yes. I know that but how do I, using the code:

var sourceAddress = Appery("inputSource").val();
var destinationAddress = Appery("inputDestination").val();
var map = Appery("directionsMap").gmap;
displayDirections(sourceAddress, destinationAddress, map);

get the Latitude and Longitude from the storage variables? Meaning, what do I replace the "var sourceAddress = Appery("inputSource").val();" with to
read the local variable and what do I replace the "var destinationAddress = Appery("inputDestination").val();" with to use a set destination? Does it read the address as a String and pass that to google or what?


How do I make an app that gives me directions from my location and takes me to a unchangeable location

Posted: Sun Sep 08, 2013 1:32 am
by Andres Tame

How do I make an app that gives me directions from my location and takes me to a unchangeable location

Posted: Sun Sep 08, 2013 3:59 am
by maxkatz

You can use local storage API directly to read the values: https://developer.mozilla.org/en-US/d...


How do I make an app that gives me directions from my location and takes me to a unchangeable location

Posted: Fri Jan 03, 2014 11:13 am
by Grant Smith

I have the same question and the answers given don't really help.


How do I make an app that gives me directions from my location and takes me to a unchangeable location

Posted: Fri Jan 03, 2014 11:54 am
by Oleg Danchenkov

Hi Grant.
I believe Illya gives you good direction on how to build your application. What specific question do you have?


How do I make an app that gives me directions from my location and takes me to a unchangeable location

Posted: Fri Jan 24, 2014 4:07 pm
by MobiCycle UK

Can you please answer the question with detailed step by step instructions?


How do I make an app that gives me directions from my location and takes me to a unchangeable location

Posted: Fri Jan 24, 2014 6:08 pm
by Maryna Brodina

Hello! Could you clarify what is specific question you have?


How do I make an app that gives me directions from my location and takes me to a unchangeable location

Posted: Sat Jan 25, 2014 3:28 pm
by MobiCycle UK

What are the step by step instruction for making an app that gives directions from a given location to a unchangeable location?