# Event Map Extension for Radiant
This extension adds mapping to the [event_calendar](http://github.com/radiant/radiant-event-calendar-extension). It will geocode your events automatically based on the address of the venue, or you can supply a postal code, UK postcode or grid reference for greater precision.
Events can be displayed on a google map and you can create links to bing or google maps that display the location of each event.
## Installation
As of version 1.5.0 this extension is only compatible with radiant 1.0 and should be installed as a gem:
gem install radiant-event_map-extension
and then in your radiant application's Gemfile:
gem 'radiant-event_map-extension', '~> 1.4.0'
## Requirements
These will be installed automatically when you install the gem:
* [event_calendar](http://github.com/radiant/radiant-event-calendar-extension) extension version 1.5 or greater
* [layouts](http://github.com/squaretalent/radiant-layouts-extension) or [share_layouts](http://github.com/radiant/radiant-share-layouts-extension) extension
* [geokit](http://geokit.rubyforge.org/) gem
## Configuration
There is one required config setting if you're using the full-page map controller:
* `event_map.layout` is the name of the layout used by the controller
If you're only using the `events:googlemap` radius tag then this isn't required.
## Basic Usage
### Linking to maps
We override the `url` method of EventVenue to return a map link if no other url is defined. The format of those links is determined by the link template stored in the config setting `event_map.link_format`. The markers :lat, :lng and :title will be replaced with the the correct value for each event venue.
There are also two shortcuts:
* 'google' is the default and equivalent to `http://maps.google.com/maps?q=:lat+:lng+(:title)` and will drop a pin on a google map.
* 'bing' is equivalent to `http://www.bing.com/maps/?v=2&cp=:lat~:lng&rtp=~pos.:lat_:lng_:title&lvl=15&sty=s&eo=0`, which will display a 1:25000 ordnance survey map (if you're in the UK) with a destination flag at your chosen point.
### Placing a map on one of your pages
For simple uses this radius tag might suffice: