PHP code example of hypejunction / google_maps_autocomplete
1. Go to this page and download the library: Download hypejunction/google_maps_autocomplete 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/ */
hypejunction / google_maps_autocomplete example snippets
echo elgg_view_input('location', [
'name' => 'city_in_france',
'data-types' => json_encode(['(cities)']),
'data-component-restrictions' => json_encode(['country' => 'fr']),
]);
$location = get_input('my_input_name');
$extended = get_input('__location');
$index = array_search($location, $extended['location']);
$street_address = $extended['street_address'][$index];
$postal_code = $extended['postal_code'][$index];
...