@@ -11,8 +11,8 @@ discard block |
||
11 | 11 | Route4Me::setApiKey('11111111111111111111111111111111'); |
12 | 12 | |
13 | 13 | $geocodingParameters = array( |
14 | - 'strExportFormat' => 'json', |
|
15 | - 'addresses' => 'Los20%Angeles20%International20%Airport,20%CA' |
|
14 | + 'strExportFormat' => 'json', |
|
15 | + 'addresses' => 'Los20%Angeles20%International20%Airport,20%CA' |
|
16 | 16 | ); |
17 | 17 | |
18 | 18 | $fGeoCoding = new Geocoding(); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $fgResult = $fGeoCoding->forwardGeocoding($geocodingParameters); |
21 | 21 | |
22 | 22 | if ($geocodingParameters['strExportFormat']=='json') { |
23 | - Route4Me::simplePrint($fgResult); |
|
23 | + Route4Me::simplePrint($fgResult); |
|
24 | 24 | } else { |
25 | - Route4Me::simplePrint($fgResult['destination']); |
|
25 | + Route4Me::simplePrint($fgResult['destination']); |
|
26 | 26 | } |
@@ -11,8 +11,8 @@ discard block |
||
11 | 11 | Route4Me::setApiKey('11111111111111111111111111111111'); |
12 | 12 | |
13 | 13 | $geocodingParameters = array( |
14 | - 'format' => 'xml', |
|
15 | - 'addresses' => '42.35863,-71.05670' |
|
14 | + 'format' => 'xml', |
|
15 | + 'addresses' => '42.35863,-71.05670' |
|
16 | 16 | ); |
17 | 17 | |
18 | 18 | $fGeoCoding = new Geocoding(); |
@@ -20,13 +20,13 @@ discard block |
||
20 | 20 | $fgResult = $fGeoCoding->reverseGeocoding($geocodingParameters); |
21 | 21 | |
22 | 22 | if ($geocodingParameters['format']=='json') { |
23 | - foreach ($fgResult as $dest) { |
|
24 | - Route4Me::simplePrint($dest); |
|
25 | - echo "<br>"; |
|
26 | - } |
|
23 | + foreach ($fgResult as $dest) { |
|
24 | + Route4Me::simplePrint($dest); |
|
25 | + echo "<br>"; |
|
26 | + } |
|
27 | 27 | } else { |
28 | - foreach ($fgResult['destination'] as $dest) { |
|
29 | - Route4Me::simplePrint($dest); |
|
30 | - echo "<br>"; |
|
31 | - } |
|
28 | + foreach ($fgResult['destination'] as $dest) { |
|
29 | + Route4Me::simplePrint($dest); |
|
30 | + echo "<br>"; |
|
31 | + } |
|
32 | 32 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | Route4Me::simplePrint($dest); |
25 | 25 | echo "<br>"; |
26 | 26 | } |
27 | -} else { |
|
27 | +} else { |
|
28 | 28 | foreach ($fgResult['destination'] as $dest) { |
29 | 29 | Route4Me::simplePrint($dest); |
30 | 30 | echo "<br>"; |
@@ -13,7 +13,7 @@ |
||
13 | 13 | Route4Me::setApiKey('11111111111111111111111111111111'); |
14 | 14 | |
15 | 15 | $gcParameters = (array)Geocoding::fromArray(array( |
16 | - "pk" => 4 |
|
16 | + "pk" => 4 |
|
17 | 17 | )); |
18 | 18 | |
19 | 19 | $geocoding = new Geocoding(); |
@@ -13,16 +13,16 @@ discard block |
||
13 | 13 | Route4Me::setApiKey('11111111111111111111111111111111'); |
14 | 14 | |
15 | 15 | $addressList = array( |
16 | - "Los Angeles International Airport, CA", |
|
17 | - "n512,Florida Pl,Barberton,OH,44203", |
|
18 | - "3495,Purdue St,Cuyahoga Falls,OH,44221" |
|
16 | + "Los Angeles International Airport, CA", |
|
17 | + "n512,Florida Pl,Barberton,OH,44203", |
|
18 | + "3495,Purdue St,Cuyahoga Falls,OH,44221" |
|
19 | 19 | ); |
20 | 20 | |
21 | 21 | $addressesString = implode('\n', $addressList); |
22 | 22 | |
23 | 23 | $geocodingParameters = array( |
24 | - 'strExportFormat' => 'json', |
|
25 | - 'addresses' => $addressesString |
|
24 | + 'strExportFormat' => 'json', |
|
25 | + 'addresses' => $addressesString |
|
26 | 26 | ); |
27 | 27 | |
28 | 28 | $fGeoCoding = new Geocoding(); |
@@ -30,13 +30,13 @@ discard block |
||
30 | 30 | $bgResults = $fGeoCoding->forwardGeocoding($geocodingParameters); |
31 | 31 | |
32 | 32 | if ($geocodingParameters['strExportFormat']=='json') { |
33 | - foreach ($bgResults as $bgResult) { |
|
34 | - Route4Me::simplePrint($bgResult); |
|
35 | - echo "<br>"; |
|
36 | - } |
|
33 | + foreach ($bgResults as $bgResult) { |
|
34 | + Route4Me::simplePrint($bgResult); |
|
35 | + echo "<br>"; |
|
36 | + } |
|
37 | 37 | } else { |
38 | - foreach ($bgResults['destination'] as $bgResult) { |
|
39 | - Route4Me::simplePrint($bgResult); |
|
40 | - echo "<br>"; |
|
41 | - } |
|
38 | + foreach ($bgResults['destination'] as $bgResult) { |
|
39 | + Route4Me::simplePrint($bgResult); |
|
40 | + echo "<br>"; |
|
41 | + } |
|
42 | 42 | } |
@@ -12,12 +12,12 @@ |
||
12 | 12 | |
13 | 13 | // Create a custom note type |
14 | 14 | $noteParameters=array( |
15 | - "type" => 'To Do', |
|
16 | - "values" => array( |
|
17 | - 'Pass a package', |
|
18 | - 'Pickup package', |
|
19 | - 'Do a service' |
|
20 | - ) |
|
15 | + "type" => 'To Do', |
|
16 | + "values" => array( |
|
17 | + 'Pass a package', |
|
18 | + 'Pickup package', |
|
19 | + 'Do a service' |
|
20 | + ) |
|
21 | 21 | ); |
22 | 22 | |
23 | 23 | $address = new Address(); |
@@ -11,7 +11,7 @@ |
||
11 | 11 | Route4Me::setApiKey('11111111111111111111111111111111'); |
12 | 12 | |
13 | 13 | // Create a custom note type |
14 | -$noteParameters=array( |
|
14 | +$noteParameters = array( |
|
15 | 15 | "type" => 'To Do', |
16 | 16 | "values" => array( |
17 | 17 | 'Pass a package', |
@@ -28,13 +28,13 @@ discard block |
||
28 | 28 | |
29 | 29 | // Add an address note |
30 | 30 | $noteParameters = array( |
31 | - "route_id" => $route_id, |
|
32 | - "address_id" => $route_destination_id, |
|
33 | - "dev_lat" => 33.132675170898, |
|
34 | - "dev_lng" => -83.244743347168, |
|
35 | - "device_type" => "web", |
|
36 | - "strUpdateType" => "dropoff", |
|
37 | - "strNoteContents" => "Test ".time() |
|
31 | + "route_id" => $route_id, |
|
32 | + "address_id" => $route_destination_id, |
|
33 | + "dev_lat" => 33.132675170898, |
|
34 | + "dev_lng" => -83.244743347168, |
|
35 | + "device_type" => "web", |
|
36 | + "strUpdateType" => "dropoff", |
|
37 | + "strNoteContents" => "Test ".time() |
|
38 | 38 | ); |
39 | 39 | |
40 | 40 | $address = new Address(); |
@@ -45,8 +45,8 @@ discard block |
||
45 | 45 | |
46 | 46 | // Get address notes |
47 | 47 | $noteParameters = array( |
48 | - "route_id" => $route_id, |
|
49 | - "route_destination_id" => $route_destination_id |
|
48 | + "route_id" => $route_id, |
|
49 | + "route_destination_id" => $route_destination_id |
|
50 | 50 | ); |
51 | 51 | |
52 | 52 | $address = new Address(); |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | echo "Destination note count --> ".$notes['destination_note_count']."<br>"; |
57 | 57 | |
58 | 58 | foreach ($notes['notes'] as $note) { |
59 | - echo "========== Notes ==================<br>"; |
|
60 | - echo "note_id --> ".$note['note_id']."<br>"; |
|
61 | - $content = isset($note['contents']) ? $note['contents'] : ""; |
|
62 | - if (strlen($content)>0) echo "contents --> $content"."<br>"; |
|
59 | + echo "========== Notes ==================<br>"; |
|
60 | + echo "note_id --> ".$note['note_id']."<br>"; |
|
61 | + $content = isset($note['contents']) ? $note['contents'] : ""; |
|
62 | + if (strlen($content)>0) echo "contents --> $content"."<br>"; |
|
63 | 63 | } |
@@ -33,7 +33,7 @@ |
||
33 | 33 | |
34 | 34 | // Get a specified user with details |
35 | 35 | $param = array ( |
36 | - "member_id" => $randomUserID |
|
36 | + "member_id" => $randomUserID |
|
37 | 37 | ); |
38 | 38 | |
39 | 39 | $response = $member->getUser($param); |
@@ -32,7 +32,7 @@ |
||
32 | 32 | echo "Random user ID -> $randomUserID <br><br>"; |
33 | 33 | |
34 | 34 | // Get a specified user with details |
35 | -$param = array ( |
|
35 | +$param = array( |
|
36 | 36 | "member_id" => $randomUserID |
37 | 37 | ); |
38 | 38 |
@@ -14,21 +14,21 @@ |
||
14 | 14 | Route4Me::setApiKey('11111111111111111111111111111111'); |
15 | 15 | |
16 | 16 | $params = Member::fromArray(array ( |
17 | - "HIDE_ROUTED_ADDRESSES" => "FALSE", |
|
18 | - "member_phone" => "571-259-5939", |
|
19 | - "member_zipcode" => "22102", |
|
20 | - "route_count" => null, |
|
21 | - "member_email" => "[email protected]", |
|
22 | - "HIDE_VISITED_ADDRESSES"=> "FALSE", |
|
23 | - "READONLY_USER" => "FALSE", |
|
24 | - "member_type" => "SUB_ACCOUNT_DRIVER", |
|
25 | - "date_of_birth" => "1994-10-01", |
|
26 | - "member_first_name" => "Clay", |
|
27 | - "member_password" => "123456", |
|
28 | - "HIDE_NONFUTURE_ROUTES" => "FALSE", |
|
29 | - "member_last_name" => "Abraham", |
|
30 | - "SHOW_ALL_VEHICLES" => "FALSE", |
|
31 | - "SHOW_ALL_DRIVERS" => "FALSE" |
|
17 | + "HIDE_ROUTED_ADDRESSES" => "FALSE", |
|
18 | + "member_phone" => "571-259-5939", |
|
19 | + "member_zipcode" => "22102", |
|
20 | + "route_count" => null, |
|
21 | + "member_email" => "[email protected]", |
|
22 | + "HIDE_VISITED_ADDRESSES"=> "FALSE", |
|
23 | + "READONLY_USER" => "FALSE", |
|
24 | + "member_type" => "SUB_ACCOUNT_DRIVER", |
|
25 | + "date_of_birth" => "1994-10-01", |
|
26 | + "member_first_name" => "Clay", |
|
27 | + "member_password" => "123456", |
|
28 | + "HIDE_NONFUTURE_ROUTES" => "FALSE", |
|
29 | + "member_last_name" => "Abraham", |
|
30 | + "SHOW_ALL_VEHICLES" => "FALSE", |
|
31 | + "SHOW_ALL_DRIVERS" => "FALSE" |
|
32 | 32 | )); |
33 | 33 | |
34 | 34 | $member = new Member(); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | // This example is not available for demo API key |
14 | 14 | Route4Me::setApiKey('11111111111111111111111111111111'); |
15 | 15 | |
16 | -$params = Member::fromArray(array ( |
|
16 | +$params = Member::fromArray(array( |
|
17 | 17 | "HIDE_ROUTED_ADDRESSES" => "FALSE", |
18 | 18 | "member_phone" => "571-259-5939", |
19 | 19 | "member_zipcode" => "22102", |
@@ -13,9 +13,9 @@ |
||
13 | 13 | Route4Me::setApiKey('11111111111111111111111111111111'); |
14 | 14 | |
15 | 15 | $Parameters = Member::fromArray(array( |
16 | - 'strEmail' => '[email protected]', |
|
17 | - 'strPassword' => 'dddddddd', |
|
18 | - 'format' => 'json', |
|
16 | + 'strEmail' => '[email protected]', |
|
17 | + 'strPassword' => 'dddddddd', |
|
18 | + 'format' => 'json', |
|
19 | 19 | )); |
20 | 20 | |
21 | 21 | $member = new Member(); |