@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | - $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
4 | + $vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
5 | 5 | |
6 | 6 | require $vdir.'/../vendor/autoload.php'; |
7 | 7 | |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | // Set the api key in the Route4me class |
14 | 14 | Route4Me::setApiKey('11111111111111111111111111111111'); |
15 | 15 | |
16 | - $gcParameters=(array)Geocoding::fromArray(array( |
|
16 | + $gcParameters = (array)Geocoding::fromArray(array( |
|
17 | 17 | "zipcode" => '00601', |
18 | 18 | "offset" => 0, |
19 | 19 | "limit" => 20 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
5 | 5 | |
6 | - require $vdir.'/../vendor/autoload.php'; |
|
6 | + require $vdir.'/../vendor/autoload.php'; |
|
7 | 7 | |
8 | 8 | use Route4Me\Route4Me; |
9 | 9 | use Route4Me\Geocoding; |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | - $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
4 | + $vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
5 | 5 | |
6 | 6 | require $vdir.'/../vendor/autoload.php'; |
7 | 7 | |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | // Set the api key in the Route4me class |
14 | 14 | Route4Me::setApiKey('11111111111111111111111111111111'); |
15 | 15 | |
16 | - $gcParameters=(array)Geocoding::fromArray(array( |
|
16 | + $gcParameters = (array)Geocoding::fromArray(array( |
|
17 | 17 | "zipcode" => '00601' |
18 | 18 | )); |
19 | 19 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
5 | 5 | |
6 | - require $vdir.'/../vendor/autoload.php'; |
|
6 | + require $vdir.'/../vendor/autoload.php'; |
|
7 | 7 | |
8 | 8 | use Route4Me\Route4Me; |
9 | 9 | use Route4Me\Geocoding; |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | - $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
4 | + $vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
5 | 5 | |
6 | 6 | require $vdir.'/../vendor/autoload.php'; |
7 | 7 | |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | // Set the api key in the Route4me class |
14 | 14 | Route4Me::setApiKey('11111111111111111111111111111111'); |
15 | 15 | |
16 | - $gcParameters=(array)Geocoding::fromArray(array( |
|
16 | + $gcParameters = (array)Geocoding::fromArray(array( |
|
17 | 17 | "zipcode" => '00601', |
18 | 18 | "housenumber" => 17 |
19 | 19 | )); |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
5 | 5 | |
6 | - require $vdir.'/../vendor/autoload.php'; |
|
6 | + require $vdir.'/../vendor/autoload.php'; |
|
7 | 7 | |
8 | 8 | use Route4Me\Route4Me; |
9 | 9 | use Route4Me\Geocoding; |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | - $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
4 | + $vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
5 | 5 | |
6 | 6 | require $vdir.'/../vendor/autoload.php'; |
7 | 7 | |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | // Set the api key in the Route4me class |
12 | 12 | Route4Me::setApiKey('11111111111111111111111111111111'); |
13 | 13 | |
14 | - $geocodingParameters=array( |
|
14 | + $geocodingParameters = array( |
|
15 | 15 | 'format' => 'xml', |
16 | 16 | 'addresses' => '42.35863,-71.05670' |
17 | 17 | ); |
@@ -6,7 +6,6 @@ |
||
6 | 6 | require $vdir.'/../vendor/autoload.php'; |
7 | 7 | |
8 | 8 | use Route4Me\Route4Me; |
9 | - use Route4Me\Route; |
|
10 | 9 | |
11 | 10 | // Set the api key in the Route4me class |
12 | 11 | Route4Me::setApiKey('11111111111111111111111111111111'); |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | - $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
4 | + $vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
5 | 5 | |
6 | 6 | require $vdir.'/../vendor/autoload.php'; |
7 | 7 | |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | // Set the api key in the Route4me class |
14 | 14 | Route4Me::setApiKey('11111111111111111111111111111111'); |
15 | 15 | |
16 | - $gcParameters=(array)Geocoding::fromArray(array( |
|
16 | + $gcParameters = (array)Geocoding::fromArray(array( |
|
17 | 17 | "pk" => 4 |
18 | 18 | )); |
19 | 19 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
5 | 5 | |
6 | - require $vdir.'/../vendor/autoload.php'; |
|
6 | + require $vdir.'/../vendor/autoload.php'; |
|
7 | 7 | |
8 | 8 | use Route4Me\Route4Me; |
9 | 9 | use Route4Me\Geocoding; |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | - $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
4 | + $vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
5 | 5 | |
6 | 6 | require $vdir.'/../vendor/autoload.php'; |
7 | 7 | |
@@ -13,16 +13,16 @@ discard block |
||
13 | 13 | |
14 | 14 | $routeId = '06B655F27E0D6A74BD37F6F9758E4D2E'; |
15 | 15 | |
16 | - $activityParameters=ActivityParameters::fromArray(array( |
|
16 | + $activityParameters = ActivityParameters::fromArray(array( |
|
17 | 17 | "route_id" => $routeId, |
18 | 18 | "team" => "true" |
19 | 19 | )); |
20 | 20 | |
21 | 21 | |
22 | - $activities=new ActivityParameters(); |
|
23 | - $actresults=$activities->get($activityParameters); |
|
22 | + $activities = new ActivityParameters(); |
|
23 | + $actresults = $activities->get($activityParameters); |
|
24 | 24 | |
25 | - $results=$activities->getValue($actresults,"results"); |
|
25 | + $results = $activities->getValue($actresults, "results"); |
|
26 | 26 | |
27 | 27 | Route4Me::simplePrint($results); |
28 | 28 |
@@ -6,7 +6,6 @@ |
||
6 | 6 | require $vdir.'/../vendor/autoload.php'; |
7 | 7 | |
8 | 8 | use Route4Me\Route4Me; |
9 | - use Route4Me\Route; |
|
10 | 9 | |
11 | 10 | // Set the api key in the Route4Me class |
12 | 11 | Route4Me::setApiKey('11111111111111111111111111111111'); |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
5 | 5 | |
6 | - require $vdir.'/../vendor/autoload.php'; |
|
6 | + require $vdir.'/../vendor/autoload.php'; |
|
7 | 7 | |
8 | 8 | use Route4Me\Route4Me; |
9 | 9 | use Route4Me\Route; |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
5 | 5 | |
6 | - require $vdir.'/../vendor/autoload.php'; |
|
6 | + require $vdir.'/../vendor/autoload.php'; |
|
7 | 7 | |
8 | 8 | use Route4Me\Route4Me; |
9 | 9 | use Route4Me\Enum\TerritoryTypes; |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | - $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
4 | + $vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
5 | 5 | |
6 | 6 | require $vdir.'/../vendor/autoload.php'; |
7 | 7 | |
@@ -13,23 +13,23 @@ discard block |
||
13 | 13 | // Add Avoidance Zone and get territory_id |
14 | 14 | //--------------------------------------------------------- |
15 | 15 | $territory = new Territory(); |
16 | - $territory->type = TerritoryTypes::CIRCLE; |
|
17 | - $territory->data = array ( |
|
16 | + $territory->type = TerritoryTypes::CIRCLE; |
|
17 | + $territory->data = array( |
|
18 | 18 | "37.569752822786455,-77.47833251953125", |
19 | 19 | "5000" |
20 | 20 | ); |
21 | 21 | |
22 | - $AvoisanceZoneParameters=AvoidanceZone::fromArray(array( |
|
23 | - "territory_name" => "Test Territory ".strval(rand(10000,99999)), |
|
22 | + $AvoisanceZoneParameters = AvoidanceZone::fromArray(array( |
|
23 | + "territory_name" => "Test Territory ".strval(rand(10000, 99999)), |
|
24 | 24 | "territory_color" => "ff7700", |
25 | 25 | "territory" => $territory |
26 | 26 | )); |
27 | 27 | |
28 | - $avoidancezone=new AvoidanceZone(); |
|
28 | + $avoidancezone = new AvoidanceZone(); |
|
29 | 29 | |
30 | 30 | $result = (array)$avoidancezone->addAvoidanceZone($AvoisanceZoneParameters); |
31 | 31 | |
32 | - $territory_id=""; |
|
32 | + $territory_id = ""; |
|
33 | 33 | if (isset($result)) { |
34 | 34 | $territory_id = $result["territory_id"]; |
35 | 35 | } else { |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | - $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
4 | + $vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
5 | 5 | |
6 | 6 | require $vdir.'/../vendor/autoload.php'; |
7 | 7 | |
@@ -13,19 +13,19 @@ discard block |
||
13 | 13 | // Example refers to the process of creating Avoidance Zone with circle shape |
14 | 14 | |
15 | 15 | $territory = new Territory(); |
16 | - $territory->type = TerritoryTypes::CIRCLE; |
|
17 | - $territory->data = array ( |
|
16 | + $territory->type = TerritoryTypes::CIRCLE; |
|
17 | + $territory->data = array( |
|
18 | 18 | "37.569752822786455,-77.47833251953125", |
19 | 19 | "5000" |
20 | 20 | ); |
21 | 21 | |
22 | - $AvoisanceZoneParameters=AvoidanceZone::fromArray(array( |
|
23 | - "territory_name" => "Test Circle Avoidance Zone ".strval(rand(10000,99999)), |
|
22 | + $AvoisanceZoneParameters = AvoidanceZone::fromArray(array( |
|
23 | + "territory_name" => "Test Circle Avoidance Zone ".strval(rand(10000, 99999)), |
|
24 | 24 | "territory_color" => "ff7700", |
25 | 25 | "territory" => $territory |
26 | 26 | )); |
27 | 27 | |
28 | - $avoidancezone=new AvoidanceZone(); |
|
28 | + $avoidancezone = new AvoidanceZone(); |
|
29 | 29 | |
30 | 30 | $result = $avoidancezone->addAvoidanceZone($AvoisanceZoneParameters); |
31 | 31 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
5 | 5 | |
6 | - require $vdir.'/../vendor/autoload.php'; |
|
6 | + require $vdir.'/../vendor/autoload.php'; |
|
7 | 7 | |
8 | 8 | use Route4Me\Route4Me; |
9 | 9 | use Route4Me\Enum\TerritoryTypes; |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | namespace Route4Me; |
3 | 3 | |
4 | - $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
4 | + $vdir = $_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
|
5 | 5 | |
6 | 6 | require $vdir.'/../vendor/autoload.php'; |
7 | 7 | |
@@ -13,19 +13,19 @@ discard block |
||
13 | 13 | // Example refers to the process of creating Avoidance Zone with rectangular shape |
14 | 14 | |
15 | 15 | $territory = new Territory(); |
16 | - $territory->type = TerritoryTypes::RECT; |
|
17 | - $territory->data = array ( |
|
16 | + $territory->type = TerritoryTypes::RECT; |
|
17 | + $territory->data = array( |
|
18 | 18 | "43.51668853502909,-109.3798828125", |
19 | 19 | "46.98025235521883,-101.865234375" |
20 | 20 | ); |
21 | 21 | |
22 | - $AvoisanceZoneParameters=AvoidanceZone::fromArray(array( |
|
23 | - "territory_name" => "Test Rectangular Avoidance Zone ".strval(rand(10000,99999)), |
|
22 | + $AvoisanceZoneParameters = AvoidanceZone::fromArray(array( |
|
23 | + "territory_name" => "Test Rectangular Avoidance Zone ".strval(rand(10000, 99999)), |
|
24 | 24 | "territory_color" => "ff7700", |
25 | 25 | "territory" => $territory |
26 | 26 | )); |
27 | 27 | |
28 | - $avoidancezone=new AvoidanceZone(); |
|
28 | + $avoidancezone = new AvoidanceZone(); |
|
29 | 29 | |
30 | 30 | $result = $avoidancezone->addAvoidanceZone($AvoisanceZoneParameters); |
31 | 31 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | $vdir=$_SERVER['DOCUMENT_ROOT'].'/route4me/examples/'; |
5 | 5 | |
6 | - require $vdir.'/../vendor/autoload.php'; |
|
6 | + require $vdir.'/../vendor/autoload.php'; |
|
7 | 7 | |
8 | 8 | use Route4Me\Route4Me; |
9 | 9 | use Route4Me\Enum\TerritoryTypes; |