@@ -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 | } |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | -$root = realpath(dirname(__FILE__) . '/../../'); |
|
5 | -require $root . '/vendor/autoload.php'; |
|
4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
5 | +require $root.'/vendor/autoload.php'; |
|
6 | 6 | |
7 | 7 | use Route4Me\Route4Me; |
8 | 8 | use Route4Me\Route; |
@@ -19,12 +19,12 @@ discard block |
||
19 | 19 | |
20 | 20 | $fgResult = $fGeoCoding->reverseGeocoding($geocodingParameters); |
21 | 21 | |
22 | -if ($geocodingParameters['format'] == 'json') { |
|
22 | +if ($geocodingParameters['format']=='json') { |
|
23 | 23 | foreach ($fgResult as $dest) { |
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>"; |
@@ -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,9 +13,9 @@ discard block |
||
13 | 13 | Route4Me::setApiKey('11111111111111111111111111111111'); |
14 | 14 | |
15 | 15 | $gcParameters = (array)Geocoding::fromArray(array( |
16 | - "zipcode" => '00601', |
|
17 | - "offset" => 0, |
|
18 | - "limit" => 20 |
|
16 | + "zipcode" => '00601', |
|
17 | + "offset" => 0, |
|
18 | + "limit" => 20 |
|
19 | 19 | )); |
20 | 20 | |
21 | 21 | $geocoding = new Geocoding(); |
@@ -23,6 +23,6 @@ discard block |
||
23 | 23 | $response = $geocoding->getZipCode($gcParameters); |
24 | 24 | |
25 | 25 | foreach ($response as $gcode) { |
26 | - Route4Me::simplePrint($gcode); |
|
27 | - echo "<br>"; |
|
26 | + Route4Me::simplePrint($gcode); |
|
27 | + echo "<br>"; |
|
28 | 28 | } |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | -$root = realpath(dirname(__FILE__) . '/../../'); |
|
5 | -require $root . '/vendor/autoload.php'; |
|
4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
5 | +require $root.'/vendor/autoload.php'; |
|
6 | 6 | |
7 | 7 | use Route4Me\Route4Me; |
8 | 8 | use Route4Me\Geocoding; |
@@ -13,8 +13,8 @@ discard block |
||
13 | 13 | Route4Me::setApiKey('11111111111111111111111111111111'); |
14 | 14 | |
15 | 15 | $gcParameters = (array)Geocoding::fromArray(array( |
16 | - "zipcode" => '00601', |
|
17 | - "housenumber" => 17 |
|
16 | + "zipcode" => '00601', |
|
17 | + "housenumber" => 17 |
|
18 | 18 | )); |
19 | 19 | |
20 | 20 | $geocoding = new Geocoding(); |
@@ -22,6 +22,6 @@ discard block |
||
22 | 22 | $response = $geocoding->getService($gcParameters); |
23 | 23 | |
24 | 24 | foreach ($response as $gcode) { |
25 | - Route4Me::simplePrint($gcode); |
|
26 | - echo "<br>"; |
|
25 | + Route4Me::simplePrint($gcode); |
|
26 | + echo "<br>"; |
|
27 | 27 | } |
@@ -13,7 +13,7 @@ discard block |
||
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(); |
@@ -22,4 +22,4 @@ discard block |
||
22 | 22 | |
23 | 23 | Route4Me::simplePrint($response); |
24 | 24 | |
25 | - |
|
26 | 25 | \ No newline at end of file |
26 | + |
|
27 | 27 | \ No newline at end of file |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | -$root = realpath(dirname(__FILE__) . '/../../'); |
|
5 | -require $root . '/vendor/autoload.php'; |
|
4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
5 | +require $root.'/vendor/autoload.php'; |
|
6 | 6 | |
7 | 7 | use Route4Me\Route4Me; |
8 | 8 | use Route4Me\Geocoding; |
@@ -19,6 +19,6 @@ |
||
19 | 19 | $response = $geocoding->getStreetData($gcParameters); |
20 | 20 | |
21 | 21 | foreach ($response as $gcode) { |
22 | - Route4Me::simplePrint($gcode); |
|
23 | - echo "<br>"; |
|
22 | + Route4Me::simplePrint($gcode); |
|
23 | + echo "<br>"; |
|
24 | 24 | } |
@@ -13,10 +13,10 @@ discard block |
||
13 | 13 | Route4Me::setApiKey('11111111111111111111111111111111'); |
14 | 14 | |
15 | 15 | $gcParameters = (array)Geocoding::fromArray(array( |
16 | - "zipcode" => '00601', |
|
17 | - "housenumber" => 17, |
|
18 | - "offset" => 0, |
|
19 | - "limit" => 10 |
|
16 | + "zipcode" => '00601', |
|
17 | + "housenumber" => 17, |
|
18 | + "offset" => 0, |
|
19 | + "limit" => 10 |
|
20 | 20 | )); |
21 | 21 | |
22 | 22 | $geocoding = new Geocoding(); |
@@ -24,6 +24,6 @@ discard block |
||
24 | 24 | $response = $geocoding->getService($gcParameters); |
25 | 25 | |
26 | 26 | foreach ($response as $gcode) { |
27 | - Route4Me::simplePrint($gcode); |
|
28 | - echo "<br>"; |
|
27 | + Route4Me::simplePrint($gcode); |
|
28 | + echo "<br>"; |
|
29 | 29 | } |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | -$root = realpath(dirname(__FILE__) . '/../../'); |
|
5 | -require $root . '/vendor/autoload.php'; |
|
4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
5 | +require $root.'/vendor/autoload.php'; |
|
6 | 6 | |
7 | 7 | use Route4Me\Route4Me; |
8 | 8 | use Route4Me\Geocoding; |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | Route4Me::setApiKey('11111111111111111111111111111111'); |
14 | 14 | |
15 | 15 | $gcParameters = (array)Geocoding::fromArray(array( |
16 | - "zipcode" => '00601' |
|
16 | + "zipcode" => '00601' |
|
17 | 17 | )); |
18 | 18 | |
19 | 19 | $geocoding = new Geocoding(); |
@@ -21,6 +21,6 @@ discard block |
||
21 | 21 | $response = $geocoding->getZipCode($gcParameters); |
22 | 22 | |
23 | 23 | foreach ($response as $gcode) { |
24 | - Route4Me::simplePrint($gcode); |
|
25 | - echo "<br>"; |
|
24 | + Route4Me::simplePrint($gcode); |
|
25 | + echo "<br>"; |
|
26 | 26 | } |
@@ -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 | } |
@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | -$root = realpath(dirname(__FILE__) . '/../../'); |
|
5 | -require $root . '/vendor/autoload.php'; |
|
4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
5 | +require $root.'/vendor/autoload.php'; |
|
6 | 6 | |
7 | 7 | use Route4Me\Route4Me; |
8 | 8 | use Route4Me\Route; |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | $bgResults = $fGeoCoding->forwardGeocoding($geocodingParameters); |
31 | 31 | |
32 | -if ($geocodingParameters['strExportFormat'] == 'json') { |
|
32 | +if ($geocodingParameters['strExportFormat']=='json') { |
|
33 | 33 | foreach ($bgResults as $bgResult) { |
34 | 34 | Route4Me::simplePrint($bgResult); |
35 | 35 | echo "<br>"; |
@@ -27,15 +27,15 @@ |
||
27 | 27 | |
28 | 28 | // Add a custom note to a route |
29 | 29 | $noteParameters = array( |
30 | - 'route_id' => $routeId, |
|
31 | - 'address_id' => $route_destination_id, |
|
32 | - 'format' => 'json', |
|
33 | - 'dev_lat' => 33.132675170898, |
|
34 | - 'dev_lng' => -83.244743347168, |
|
35 | - 'custom_note_type[11]' => 'slippery', |
|
36 | - 'custom_note_type[10]' => 'Backdoor', |
|
37 | - 'strUpdateType' => 'dropoff', |
|
38 | - 'strNoteContents' => 'test1111' |
|
30 | + 'route_id' => $routeId, |
|
31 | + 'address_id' => $route_destination_id, |
|
32 | + 'format' => 'json', |
|
33 | + 'dev_lat' => 33.132675170898, |
|
34 | + 'dev_lng' => -83.244743347168, |
|
35 | + 'custom_note_type[11]' => 'slippery', |
|
36 | + 'custom_note_type[10]' => 'Backdoor', |
|
37 | + 'strUpdateType' => 'dropoff', |
|
38 | + 'strNoteContents' => 'test1111' |
|
39 | 39 | ); |
40 | 40 | |
41 | 41 | $address = new Address(); |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | -$root = realpath(dirname(__FILE__) . '/../../'); |
|
5 | -require $root . '/vendor/autoload.php'; |
|
4 | +$root = realpath(dirname(__FILE__).'/../../'); |
|
5 | +require $root.'/vendor/autoload.php'; |
|
6 | 6 | |
7 | 7 | use Route4Me\Route4Me; |
8 | 8 | use Route4Me\Route; |