Skip to content

krve/statamic-google-maps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

Installation

Clone or download the repository and move the "GoogleMaps" folder into your site/addons folder.

Setup

Add your Google Maps JS API Key to the settings page ../cp/addons/google-maps/settings

Usage

You can now use google maps like so:

{{ google_maps address="1600 Amphitheatre Parkway" height="400px" }}

Options

The following options are available

  • address
  • height
  • width
  • zoom (The level of zoom)
  • markers

Adding your own markers

You can add your own markers to the map using the following syntax

{{ google_maps address="1600 Amphitheatre Parkway" height="400px" markers="Example Address 1;Example Address 2" }}

The ; represents a split. Use this if you have multiple markers.

Getting an API key

You can find Google's own guide for getting an API key here: https://developers.google.com/maps/documentation/javascript/get-api-key

Contribution

Feel free to submit pull requests if you have any ideas on how to improve the addon.