...
$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 | |
destination | A string : containing the destination address. | |
travelMode | A string : containing the type of travel mode to display, options include:
| |
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
| |
marker | Boolean : to display a marker at the map location. If Blank the default is true. | |
marker colours | A comma delimited string : to set marker colours. If Blank the default is FFFFFF,FF0000,000000. | |
sensor | height | An integer : The height of the map Boolean : fire up GPS and show user's current location. If Blank the default is false. |
width | An integer : The width of the map.If Blank the default is 480px | |
. If Blank the default is 480px |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
// 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"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; |
Info | ||
---|---|---|
| ||