PHP code example of spacedealer / yii2-here

1. Go to this page and download the library: Download spacedealer/yii2-here library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

spacedealer / yii2-here example snippets


'here' => [
	'class' => 'spacedealer\here\Here',
	'appCode' => 'your_app_code',
	'appId' => 'your_app_id',
],

$geocoder = \Yii::$app->get('here')->getGeoCoder();
$response = $geocoder->geocode([
   'city' => 'Berlin',
   'postalCode' => '10997',
   'street' => 'Schlessische Str.',
   'housenumber' => '28',
]);
$displayPosition = $response->getPath('Response/View/0/Result/0/Location/DisplayPosition');

php composer.phar