Coding with Jesse

WikiMapia: Easiest Google Maps Ever

August 18th, 2006

If you want to put a map on your web site using Google Maps, the easiest way to do that is by going to WikiMapia, finding the place you want, then going to the menu and selected "Map on your page". You'll be presented with a box that lets you pick the size and exact starting location of your map, and you'll be given a very simple HTML snippet (an iframe) you can put anywhere.

For example, I found my home in Berlin and was given the following snippet:

<iframe src=http://wikimapia.org/s/#y=52506879&x=13318394&z=19&l=0&m=a width=400 height=208 frameborder=0></iframe>

I had to change the HTML to XHTML myself by adding quotes around the attribute values and escaping the ampersands in the URL:

<iframe src="http://wikimapia.org/s/#y=52506879&amp;x=13318394&amp;z=19&amp;l=0&amp;m=a" width="400" height="208" frameborder="0"></iframe>

Unfortunately, iframe is deprecated in XHTML Strict, so this would make my page invalid. The way to embed a frame on a page in XHTML Strict is to use an object tag instead like so:

<object type="text/html" data="http://wikimapia.org/s/#y=52506879&amp;x=13318394&amp;z=19&amp;l=0&amp;m=a" width="400" height="208" style="border:0"></object>

It seems WikiMapia doesn't support the object tag when used with Internet Explorer. Well, as long as you're not using IE, you can see where I live in Berlin! The rest of you can click here instead.


Interested in web development? Subscribe to my newsletter!

Comments

1 . zakaria on January 14th, 2007

zakaria

wikmapia tres belle

2 . luxman premaratna on September 27th, 2008

luxman premaratna

please open google map search

3 . preevbhargava on September 10th, 2009

preevbhargava

praveen bhargava
s/o mr. u.k. bhargava
m.p. nagar 1st
satai road chhatarpur
(madhya pradesh)

4 . Gawade nitin chhagan on June 1st, 2010

Gawade nitin chhagan

My home is shirsainagar

5 . Gawade nitin chhagan on June 1st, 2010

Gawade nitin chhagan

Bhigvan road shirsainagar Bharanewadi .dist-pune

6 . Bharane appaso on August 10th, 2010

Bharane appaso

Biroba mandir
Bharanewadi
indapur
pune

Comments are closed, but I'd still love to hear your thoughts.