README.md in radiant-event_map-extension-1.1.0 vs README.md in radiant-event_map-extension-1.2.0
- old
+ new
@@ -45,45 +45,49 @@
* `title` is the page title and can also be shown with `r:title`
* `faceting` here only gives the option to remove any date filters that have been applied. If you add the `taggable_events` extension it gets more useful.
Here's a starting point:
- <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
- <head>
- <title><r:title /></title>
- <r:content part="map_js" />
- </head>
- <body>
- <h1 id="pagetitle"><r:title /></h1>
- <r:content part="faceting" />
- <div id="map_canvas" style="width: 600px; height 400px;"></div>
- </body>
- </html>
+ <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+ <title><r:title /></title>
+ <r:content part="map_js" />
+ </head>
+ <body>
+ <h1 id="pagetitle"><r:title /></h1>
+ <r:content part="faceting" />
+ <div id="map_canvas" style="width: 600px; height 400px;"></div>
+ </body>
+ </html>
Make sure that `Radiant::Config['event_map.layout']` matches exactly the _name_ of this layout.
### javascript compatibility
The map javascript is generated by the EventVenuesController using `app/views/event_venues/index.js.erb`. It provides a `build_map_and_markers` method and the minimal jQuery hook required to populate #map_canvas when the DOM loads.
If you're not using jQuery you should find it straightforward to call `build_map_and_markers(div element)` from another script, and in that case you don't have to use our naming scheme either.
+### Displaying a map on a normal radiant page
+
+ <r:events:googlemap calendar="slug" />
+
+If you omit the calendar attribute then all future events will be displayed.
+
+The map will be presented in a `div#map_canvas` to which your stylesheet will need to give dimensions (and any text styles you want to apply the location bubbles).
+
+At the moment you don't get any other control of displayed events, but soon the radius tag will support all the usual period specifications.
+
### JSON interface
If you don't want to use the included scripts, you can skip that whole mechanism and work with the event data instead. EventVenuesController provides a simple JSON interface. Usually it's at /map and looks for addresses like this:
/map everything
/map/2010 events in 2010
/map/2010/12/ events in December 2010
/map/2010/12/12 events on 12 December 2010
If you're using `taggable_events` then we also inherit the tag-faceting interface here.
-
-The data returned looks like this:
-
- {
-
- }
## Bugs and features
[Github issues](http://github.com/spanner/radiant-event_map-extension/issues) please, or for little things an email or github message is fine.