Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 931 Bytes

README.md

File metadata and controls

37 lines (24 loc) · 931 Bytes

Location

Find a location using Google Maps autocomplete.

This fieldtype will suggest addresses as you type. Granted the address is successfully found by Google, it will save the full address name, latitude and longitude to the page/entry.

location

Usage

Setup:

Firstly, copy the entire Location folder into site/addons/.

Enable Google Maps JavaScript API and generate an API Key: http://console.developers.google.com.

Finally, add it to Location's settings (CP > Configure > Addons > Location).

Usage:

fields:
  address:
    type: location
    display: Store Address

Output:

address:
  name: Newport Beach, CA, USA
  latitude: 33.6189101
  longitude: '-117.9289469'

A big thank you to Erin Dalzell who actually did most of the work!