2006-05-12

Add a map to your site!

I was browsing the Great TML Landgrab site and lamented the fact that many of the grabbee sites don't have maps showing where the systems are.

Now there's no excuse - just add the following line of HTML to your page, adjust the coordinates, and you've got a full fidelity map:

<iframe src="http://www.travellermap.com/iframe.htm?x=-95.914&y=70.5&scale=64&options=887" style="width: 200px; height: 200px; border: solid 1px black;"></iframe>

Note that it looks like a Permalink from the site, but with one subtle difference: "/iframe.htm" is specified rather than just the default page ("/"). This is a version of the map with no UI, specifically for embedding.

You can get the x/y by finding the system on my map site and using the "Permalink" feature in the footer - click it and it will give you the full permament URL of what you've got centered. Then copy/paste into the URL above - remembering to change the URL to include "iframe.htm"

You'll get something like this:



Note that it's a fully functional map - you can drag with the mouse and zoom by using the mouse wheel or double-clicking (hold Alt to zoom out).

Go wild!

Edited 2007-03-19 to call attention to the "iframe.htm" part of the URL necessary for embedding. Ω

9 comments:

Anonymous said...

Kick ass, Joshua!

Anonymous said...

Very cool feature! :-)
Will try this soon.

Jeff Rients said...

Totally awesome! Too bad the sectors I'm working with have been de-canonized.

Anonymous said...

Excellent idea, but I'm getting a problem: Check http://www.practicalairsoft.co.uk/tlg/

Now, in order to see how the strategic situation is, I used a 300px iframe; the result is the same on a 200px iframe btw. More than half the iframe is showing the menu bar, not the map - any ideas? using Firedfox2 btw. Thanks in advance!

Joshua Bell said...

I emailed Roger, but his site was missing the "iframe.htm" part of the URL for embedding. This is basically just a subset of the main map page that dispenses with the UI and just has the map itself.

Anonymous said...

Many thanks, Joshua - I haven't a clue how I missed that! map's working fine now :) Excellent resource :D

Roger

Anonymous said...

Thanks, Joshua -

I haven't a clue how I missed that, but there y'go - it's working fine now, and many thanks for the speedy reply :)

Again, excellent resource :D

Roger

Anonymous said...

Is the server down? All of a sudden, the map isn't there - just comes up totally blank, even after fixing my code :(

Roger

Joshua Bell said...

Oops, I accidentally broke this in the last update for URLs that specified the options parameter. Fixed!