Tuesday, July 10, 2007

Introducing the Brain Maps API

The Brain Maps API lets you embed Brain Maps in your own web pages with JavaScript. Future versions will enable you to add overlays to brain maps (including markers and polylines) and display shadowed "info windows". The Brain Maps API is a free service, available for any web site that is free to consumers.

Try going to this link to see an example, and once there, try clicking and dragging the image, or clicking on the little tree icon in the upper right. Also, the mouse scroll wheel should zoom you in and out.

Try clicking and dragging the image. Also, the mouse scroll wheel should zoom you in and out.

The code for embedding the Brain Maps API into your own website is simple, requiring just a single line of code:

<iframe src="http://brainmaps.org/ajax-viewer.html?path=http://brainmaps.org/HBP2/c.aethiops/AGM1/AGM1-highres/350/&height=78181&width=92160" width="460" height="267" frameborder="0"></iframe>

It's best to actually download the Brain Maps API and upload the required javascript to your own site, since using just the embedding code above relies on cross-site scripting which is disabled in FireFox.

Additional information is available at http://brainmaps.org/index.php?p=brain-maps-api