Skip to content

WeDreamPro/PyroStreams-Geocoder-Field-Type

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyroStreams Geocoder Field Type v1.2.1

This field type allows you to specify a geographic location which will be converted to latitude and longitude coordinates, these coordinates can then be used in the any Map API. Geocoding is the process of converting addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into geographic coordinates (like latitude 37.423021 and longitude -122.083739), which you can use to place markers or position the map. This Geocoding Field Type provides a direct way to access a geocoder via an HTTP request. When this field type is added to a stream, you can specify an address, location or coordinates into the text field and this information will be returned and saved as longitude/latitude coordinates in real time.

Audience: This field type is intended for people who want to use geocoding data within maps provided by one of the Google Maps APIs. For front-end usage examples, see Front End Usage.

Geocoder Field Type

Specify any geographic location in the field and a map will appear showing the location. The geographic location is then saved as an address with latitude and longitude coordinates.

Parameters

This field type has no parameters

Output

Parameter Example
`{{ field_slug:address }}` Full formatted address as returned by Google. e.g.: Portland, OR, USA
`{{ field_slug:latitude }}` The latitude coordinates. e.g.: 45.5234515
`{{ field_slug:lat }}` Latitude. Same as above, but shorthand.
`{{ field_slug:longitude }}` The longitude coordinates. e.g.: -122.6762071
`{{ field_slug:lng }}` Longitude. Same as above, but shorthand.

Documentation

Installation

  • Download the latest release.
  • or clone the repo: git clone git://github.com/HighwayofLife/PyroStreams-Geocoder-Field-Type.git
  • Copy the contents of this directory to either addons/<site-ref>/field_types/ or addons/shared_addons/field_types/

Bugs & Feature Requests

Contributing

Changelog

1.2.1 - September 20, 2013

  • [Fix] Coordinates would not display latitude and longitude. Issue #7 (Giles Smith)

1.2.0 - April 4, 2013

  • [Feature] Now supports saving formatted address along with lat,lng coordinates
  • This new feature is backward compatible with v1.1.0 and earlier of the geocoder field type

1.1.0 - April 3, 2013

  • [Improvement] Support PyroCMS v2.2 (kerastraight)
  • [Improvement] Hungarian Language (Peter Varga)
  • [Improvement] SSL (HTTPS) Support for the Google Maps API JS
  • [Improvement] Hard-coded language replaced by OK / Error icons (Peter Varga)
  • [Fix] Tab loading properly refreshes the Google map (Peter Varga)

1.0.1 - September 4, 2012

  • Add support for field slugs: latitude and longitude (Adam Fairholm)
  • Create CSS and JS files for geocoder
  • Add the ability to drag the marker
  • Message feedback on success and errors

1.0.0 - August 27, 2012

  • Initial release

Contributors

About

Google Maps Geocoder Field Type for PyroStreams

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 75.8%
  • JavaScript 22.2%
  • CSS 2.0%