Question
How do I create a Google map with directions?
Answer
Building a Google Map With Directions
Description #
Using this mADL function you can draw a google map with turn by turn directions using reverse locational lookup by address.
$t->map('directions', $mapOptions);
Parameters #
An array of options including the following settings.
origin : A string containing the original location address.
If set to "1" the device's current location will be used
destination : A string containing the destination address.
travelMode : A string containing the type of travel mode to display, options include
driving . If Blank this is the default.
walking
bicycling
avoidHighways : Boolean, to set the route to avoid highways. If Blank the default is false.
avoidTolls : Boolean, to set the route to avoid tollways. If Blank the default is false.
type : A string containing the type of map to display, options include
roadmap . If Blank this is the default.
satellite
terrain
hybrid
sensor : Boolean, fire up GPS and show user's current location. If Blank the default is false.
Example #
View Code In Github: https://github.com/blinkmobile/examples/blob/master/madl%20interaction/Location%20Based/%24t-%3Edirections.php