Using Google Maps in Wikidot
Forum » Help / Editing pages » Using Google Maps in Wikidot
started by: thevisitorthevisitor
on: 1207047076|%e %b %Y, %H:%M %Z|agohover
number of posts: 5
rss icon RSS: new posts
Using Google Maps in Wikidot
thevisitorthevisitor 1207047076|%e %b %Y, %H:%M %Z|agohover

It took some tinkering, but it IS possible to include Google Maps into a Wikidot page. I've got the basics to work, don't know about the truly advanced and involved features. But if all you want is a simple map, with a couple markers and the like, it is surprisingly simple.

Example: http://anewland.wikidot.com/experimental
(Reads a few points from a local XML file, and adds another few from an overlay/user map from Google. One is publicly accessible, the other under control.)

What do you need:
- a Google Maps API key, which you can easily get here for your domain: http://code.google.com/apis/maps/signup.html
- an HTML file somewhere to load into an Iframe, with the actual code for your Map application thingy… not that difficult.
- a wikidot page featuring said Iframe, trivial

Notes:
- a tricky part was, since I wanted it all in the same place, to put the HTML on Wikidot. You can upload a HTML file, but it will turn out as raw code, apparently blocked by the server. The solution was to give it some funny name - I used .scrap, include the link in the Iframe, and voila, it was displayed correctly
- the caching works very well… meaning old files will be shown for some time even if you upload edited versions, or delete them. A solution is to keep renaming the new file, and always change the Iframe in the wiki page. Not very elegant, but since it introduced some primitive version numbering, it can stay around.
- if you make a decent map, you will probably want to 'block' the wiki page, so that somebody nice doesn't happen to delete it (plus I don't know how the files are protected).

unfold Using Google Maps in Wikidot by thevisitorthevisitor, 1207047076|%e %b %Y, %H:%M %Z|agohover
Re: Using Google Maps in Wikidot
gerdamigerdami 1207073053|%e %b %Y, %H:%M %Z|agohover

Well done, thevisitorthevisitor.
You might make a copy of this thread in the HowTo section !


Aide Wikidot en Français ? Handbook !!!

unfold Re: Using Google Maps in Wikidot by gerdamigerdami, 1207073053|%e %b %Y, %H:%M %Z|agohover
Re: Using Google Maps in Wikidot
ErichSteinboeckErichSteinboeck 1207079904|%e %b %Y, %H:%M %Z|agohover

It took some tinkering, but it IS possible to include Google Maps into a Wikidot page

Taking the normal iframe code that maps.google.com provides through the "Link to this page" link on the My Maps page and rewriting it as a wikidot [[iframe ...]] works for me — no “tinkering” needed.

If one does not need to add markers to a map from a local XML file, does the way you embedded Google Maps have other advantages over simple use of the the Google Maps-provided iframe code?

Thanks!

unfold Re: Using Google Maps in Wikidot by ErichSteinboeckErichSteinboeck, 1207079904|%e %b %Y, %H:%M %Z|agohover
Re: Using Google Maps in Wikidot
thevisitorthevisitor 1207081587|%e %b %Y, %H:%M %Z|agohover

No, if all you need is a map itself. This is only good if you want to tinker around with a map, or make your own application.

unfold Re: Using Google Maps in Wikidot by thevisitorthevisitor, 1207081587|%e %b %Y, %H:%M %Z|agohover
Re: Using Google Maps in Wikidot
thevisitorthevisitor 1211114419|%e %b %Y, %H:%M %Z|agohover

Just a note of a problem I came across recently:

My map started to complain suddenly, that I have an invalid API key for the site, though it has worked before. With a bit of help, I found that uploaded files are stored on an address like
http://mywiki.wdupload.wikidotsyndication.com/local--files/my-page/file.html - so if your map runs here on a local file, you may need a new key.

last edited on 1211114438|%e %b %Y, %H:%M %Z|agohover by thevisitor + show more
unfold Re: Using Google Maps in Wikidot by thevisitorthevisitor, 1211114419|%e %b %Y, %H:%M %Z|agohover
new post
Unless stated otherwise Content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.