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 4 Current »

$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
sensor

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

Example
// Place this code in the Input Prompt of your madl interaction.

//--------------------------------------------------------------------

<arg>

 <prefix>Mapping is easy using Blink Mobile's Interaction Software Solutions.{NL}Origin{SP}</prefix>

 <select>

<option value="1">My Current Location</option>

<option value="125 Donnison Street, Gosford, New South Wales">Blink Mobile Gosford</option>

<option value="5 – 17 Young Street Sydney NSW 2000">Acresta</option>

<option value="Bennelong Point, Sydney NSW 2000">Sydney Opera House</option> 

</select>

 <suffix>{NL}</suffix>

</arg>

<arg>

 <prefix>Destination{SP}</prefix>

  <select>

 <option value="125 Donnison Street, Gosford, New South Wales">Blink Mobile Gosford</option>

<option value="5 – 17 Young Street Sydney NSW 2000">Acresta</option>

<option value="Bennelong Point, Sydney NSW 2000">Sydney Opera House</option> 

</select>

 <suffix>{NL}</suffix>

</arg>

<arg>

 <prefix>Mode{SP}</prefix>

 <select>

  <option value="driving">driving</option>

  <option value="walking">walking</option>

  <option value="bicycling">bicycling</option>

 </select>

 <suffix>{NL}</suffix>

</arg>

<arg>

 <prefix>Type{SP}</prefix>

 <select>

  <option value="roadmap">Road Map</option>

  <option value="satellite">Satellite</option>

  <option value="terrain">Terrain</option>

 <option value="hybrid">Hybrid</option>

 </select>

</arg>




//--------------------------------------------------------------------

// Place this code in the madl code of your madl interaction.

$mapOptions = Array(

'origin' => $args[0],

'destination' => $args[1],

'travelMode' => $args[2], // optional, also 'walking' or 'bicycling'

'avoidHighways' => false, // optional

'avoidTolls' => false, // optional

'type' => $args[3], // optional, also 'satellite', 'terrain' or 'hybrid'

'sensor' => true // optional, defaults to false

);



//origin and destination may also be arrays specifying separate 'latitude' and 'longitude'

//note that if sensor is true and available on device, missing origin or destination will be filled in with GPS

//both missing origin and destination will result in error message

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

return $t->result;

  • No labels