Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

$t->map("directions", $mapOptions);

$mapOptions

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

destinationA 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
markerBoolean : to display a marker at the map location. If Blank the default is true.
marker coloursA comma delimited string : to set marker colours. If Blank the default is FFFFFF,FF0000,000000.
sensor

Boolean : fire up GPS and show user's current location. If Blank the default is false.

widthAn integer : The width of the map.If Blank the default is 480px
heightAn integer : The height of the map.If Blank the default is 480px
Example
// mADL interaction With drawBasicMap:

// first set up the map variables to use

$mapOptions = array(

"longitude" => "151.316274", // location longitude to centre map

"latitude" => "-33.424065", // location latitude to centre map

"zoom" => 15, // number from 1 to 20, the higher the number the map is more zoomed in

"type" => "roadmap", // satellite, terrain and hybrid are also available

"marker" => true, // show marker at location

"sensor" => false, // fire up GPS and show user's current location

);

 
$t->map("drawBasicMap", $mapOptions);

return $t->result;



  • No labels