Google Maps

By giovanni_lpgiovanni_lp

Description

This is an explanation on how to embed a google map in wikidot.

Code

  • go to maps.google.com
  • create a map
  • click on "link to this page"
  • copy the code under "Paste HTML to embed in website" or customize the appearance of embedded map
  • edit your wiki by pasting the code between:
[[embed]] and [[/embed]]

to get this:
[[embed]]
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.pl/?ie=UTF8&amp;ll=53.020902,18.636546&amp;spn=0.018561,0.05579&amp;t=h&amp;z=15&amp;output=embed&amp;s=AARTsJqzARj-Z8VnW5pkPMLMmZbqrJcYpw"></iframe><br /><small><a href="http://maps.google.pl/?ie=UTF8&amp;ll=53.020902,18.636546&amp;spn=0.018561,0.05579&amp;t=h&amp;z=15&amp;source=embed" style="color:#0000FF;text-align:left">Wyświetl większą mapę</a></small>
[[/embed]]
  • you can modify width, height, frameborder, scrolling,etc as your wish (I modified width from 300px to 100% in this example)
  • you can also change how the map is displayed in the page by wrapping the embed tag in a div, e.g. to display the map on the right-hand side of the page, like this:
[[div style="float:right"]]
[[embed]]
<iframe width="300" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"
src="http://maps.google.com/maps/ms?ie=UTF8&amp;hl=en&amp;t=p&amp;om=1&amp;s=AARTsJrhoVfmTsOO8HkyJpKUUcfcb9at9Q&amp;
msa=0&amp;msid=112114991701558823878.00044037cef24ff719d87&amp;ll=42.228517,-9.140625&amp;spn=19.50624,26.367188&amp;
z=4&amp;output=embed"></iframe>
[[/embed]]
[[/div]]

In action


Wyświetl większą mapę

Another map in action:

[[embed]]
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com.au/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=65+woodhouse+drive+ambarvale&amp;sll=-34.063931,150.758655&amp;sspn=0.008141,0.019312&amp;ie=UTF8&amp;t=h&amp;ll=-34.077616,150.804176&amp;spn=0.054386,0.063515&amp;z=14&amp;iwloc=addr&amp;output=embed&amp;s=AARTsJp47q89hdxV7KqqkkMC2YIIJxgqJQ"></iframe>
[[/embed]]

gives:

More Action ro demonstrate:

[[embed]]
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.uk/maps/ms?hl=en&amp;ie=UTF8&amp;msa=0&amp;msid=100685272538302717572.00046f39b9745fec203a9&amp;ll=50.212064,-5.092163&amp;spn=1.462399,3.499146&amp;output=embed"></iframe>
[[/embed]]

Gives:

Most important

an advanced use of this solution permit to show on a map a kml url or a rss, geocoded, url:

  • copy the kml or geocoded rss url
  • go to google maps
  • past the url into the google maps search box
  • then get the code as explained before

You can see an easy example here


Thanks to tsangk for this great snippet: conditional-blocks


text above inserted with:

[[include :snippets:if START |unique=1|type=equal|var1=%%name%%|var2=conditional-blocks]]
**##red|Thanks to tsangk for this great snippet:##** [[[code:conditional-blocks]]]
[[include :snippets:if END]]



Other snippets posted by giovanni_lp


Rate this solution

If you think this solution is useful — rate it up!

rating: +32+x
Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License