|
@@ -71,8 +71,8 @@ discard block |
|
|
block discarded – undo |
|
71
|
71
|
$coordinates = $location->getCoordinates(); |
|
72
|
72
|
$data = [ |
|
73
|
73
|
"geometry" => [ |
|
74
|
|
- "coordinates" => $coordinates?$coordinates->getCoordinates():[0,0], |
|
75
|
|
- "type" => $coordinates?$coordinates->getType():'Point' |
|
|
74
|
+ "coordinates" => $coordinates ? $coordinates->getCoordinates() : [0, 0], |
|
|
75
|
+ "type" => $coordinates ? $coordinates->getType() : 'Point' |
|
76
|
76
|
], |
|
77
|
77
|
"type" => "Feature", |
|
78
|
78
|
"properties" => [ |
|
@@ -98,7 +98,7 @@ discard block |
|
|
block discarded – undo |
|
98
|
98
|
public function toCoordinates($input) { |
|
99
|
99
|
$client = new Client('http://api.cross-solution.de/geo'); |
|
100
|
100
|
$client->setMethod('GET'); |
|
101
|
|
- $client->setParameterGet(array('q' => $input, 'country' => 'DE', 'coor' => 1, 'zoom' => 1 , 'strict' => 0)); |
|
|
101
|
+ $client->setParameterGet(array('q' => $input, 'country' => 'DE', 'coor' => 1, 'zoom' => 1, 'strict' => 0)); |
|
102
|
102
|
$response = $client->send(); |
|
103
|
103
|
$result = $response->getBody(); |
|
104
|
104
|
$result = json_decode($result); |
Please login to merge, or discard this patch.