Giter Site home page Giter Site logo

m8brgarc / craft-geo-address Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cwspear/craft-geo-address

0.0 2.0 0.0 136 KB

An address field that also automatically supplies Latitude and Longitude coordinates in the entry.

PHP 67.55% CSS 9.70% HTML 22.76%

craft-geo-address's Introduction

Craft CMS Geo Address Field Type

Version 1.0.0

Geo Address Field

This adds a "Geo Address" field type to Craft CMS. From the control panel, it appears as a typical "Address" field, but when you save a form that uses this field, it get Geocode information from Google Maps API and saves the latitude and longitude coordinates for use in a template. That's really all it does.

Template Variables

  • street - user entered street value
  • city - user entered city value
  • state - user entered state value
  • zip - user entered zip value
  • formattedAddress - the formatted address as returned from the Google Maps API
  • lat - the latitude GPS coordinates (in the form of 47.668425)
  • lng - the longitude GPS coordinates (in the form of -117.085289)

Note if you attach these to, say, an address field, they'd be accessed off of that variable: {{ address.formattedAddress }}.

Me

Follow me on Twitter: @CWSpear or check out my blog.

craft-geo-address's People

Contributors

cwspear avatar

Watchers

James Cloos avatar Brandon Garcia-Acain avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.