Driving the map

The iFrame source URL accepts parameters to 'drive' the map:


The additional 'name' parameter below (in red) is what triggered the popup:

<iframe frameborder="0" width="any_width" height="any_height"
  name="any_name"
  src="http://mojomaps.com/iframe.php?key=your_publisher's_key&name=mojo+marketing">
</iframe>

Supported Parameters

sb=xWhere x is the location of the sidebar.
Options are left, right or none.
name=xWhere x matches any name on the map.
Spaces must be replaced with a + symbol (Hint: use urlencode in PHP).
lang=xWhere x is the two-letter ISO language code.
Currently only en (English) and th (Thai) are recognised.

Technical tip: Script your map page to read URL parameters and pass them on to the iFrame.

For example: map.php below GETs the 'place' parameter (eg $_GET['place']) and adds it to
the other iFrame URL parameters to drive the map to a particular place. This:

<a href="http://www.yoursite.com/map.php?place=ouroffice">โมโจมาร์เก็ตติ้ง</a>

Becomes this:

<a href="http://mojomaps.com/iframe.php?key=your_publisher's_key&name=mojo+marketing&lang=th">โมโจมาร์เก็ตติ้ง</a>

* In case you don't read Thai, the above link text reads "Mojo Marketing".

>> Next: Styling the iFrame