2017 © Pedro Peláez
 

elgg-plugin google_maps_autocomplete

Replaces location input with Google Maps Autocomplete

image

hypejunction/google_maps_autocomplete

Replaces location input with Google Maps Autocomplete

  • Tuesday, August 29, 2017
  • by hypeJunction
  • Repository
  • 1 Watchers
  • 0 Stars
  • 13 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Google Maps Autocomplete

Elgg 2.3, (*1)

Features

  • Replaces location input with Google Maps Autocomplete

API Key

Make sure your Google API key supports:, (*2)

  • Google Maps JavaScript API
  • Google Places API Web Service

Notes

Autocomplete options

You can pass options to google.maps.places.Autocomplete component using data- attributes of the input field., (*3)

echo elgg_view_input('location', [
    'name' => 'city_in_france',
    'data-types' => json_encode(['(cities)']),
    'data-component-restrictions' => json_encode(['country' => 'fr']),
]);

You can further filter options for each input using 'options', 'input/location' JavaScript plugin hook., (*4)

Accessing address parts

You can access address parts, UTC offset and lat/long of the location in your action:, (*5)

$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];
...

The Versions

29/08 2017

dev-master

9999999-dev http://hypejunction.com

Replaces location input with Google Maps Autocomplete

  Sources   Download

GPL-2.0

The Requires

 

by Ismayil Khayredinov

plugin maps autocomplete location elgg

29/08 2017

1.0.0

1.0.0.0 http://hypejunction.com

Replaces location input with Google Maps Autocomplete

  Sources   Download

GPL-2.0

The Requires

 

by Ismayil Khayredinov

plugin maps autocomplete location elgg