Talk:Beer Garden

From PubNight
Jump to: navigation, search

It would be bit of fun to have a map for each pub - you'd need lat and long but that's not difficult to get.

I tried pasting the code in, but for obvious reasons it won't let you stick javascript into pages.

Feel free to put that in somewhere and see if it works. That key should be good for all pages below "".

S> I installed the plugin - and there you go.

This is the code you need to insert:

<googlemap lat="51.8629287876" lon="-2.25285623389">

Put each of the markers you want on a separate line. /Using wiki link braces means that when you click on the marker it brings up a little balloon with the clickable wiki link in it. I've also borrowed a bit of your code so that the link appears on the map. I've tweaked your code to add in a with for the box and changed the calc to move the text slightly.

OR you can use <pndata dg=MB field=googlemap></pndata> as long as you have the lat and lon fields set in the data

Legal attributes are:

  • width. Defaults to 300
  • height. Defaults to 300
  • lat (the center latitude on the map)
  • lon (the center longitude on the map)
  • zoom (the zoom level; 0 is the furthest away, 17 is the closest in). Defaults to 12
  • type (legal values are normal (or, equivalently, map), hybrid, and satellite. Defaults to map
  • controls (small creates +/- zoom buttons, medium has zoom buttons and pan buttons, and large has pan buttons with a sliding scale for zoom). Defaults to medium
  • gmarker. This can be text,link or number. Text puts the pub name out, link puts a clicky link, number puts out a number (useful when you have lots of pubs on a page)

I've also changed it so that rather than using the big horrible google marker it uses a much smaller one - it looks nicer and when we've got multiple markers on a page (for example the bath road pub crawl) then it will look tidier (the click for information box still works!)

To see a nice use of the extension look at Bath Road Pub Crawl