Google Maps - different methods

Posted by gerdami on 31 Dec 2009 15:52, last edited by GoVegan on 09 May 2010 05:45

Tags: csi google javascript maps static

rating: +3+x

Introduction

You certainly know that you can embed a Google map that you can find at http://maps.google.com. But how can we embed maps automatically in page with copying and paste the code from Google.

Solutions

An easy one

This solution is based on the code to be embedded from http://maps.google.com. It uses an [[include…]] which contains [[embed]]1 instructions.

Default roadmap


 [[include :csi:include:google-map-embed | location=Rue de la Loi 200, Brussels, Belgium |
 domain=com | lang=en | width=600 | height=300 | zoom=14 ]]

Hybrid


 [[include :csi:include:google-map-embed | location=Cairo, Egypt |
 domain=com | lang=ar | width=600 | height=300 | zoom=5 | type=h ]]

Terrain


 [[include :csi:include:google-map-embed | location=Mont Blanc, France |
 domain=com | lang=fr | width=600 | height=300 | zoom=9 | type=p ]]

Parameters

  • location=street, town, country
  • domain=com or be, fr, de, it, …
  • lang=en (default) or any ISO valid language code (fr, nl, it, pt, es, de, …)
  • width and height in pixels
  • zoom: from 0 (world) to 20 (street)
  • type: nil for the default roadmap, h for hybrid, p for terrain

Other

Do not ask me how to disable the popup, I don't know (yet).

A static one

This version requires a free Google API key2, choose wikidot.com as valid domain.

A Javascript based one

This version requires a free Google API key, choose wdfiles.com as valid domain.
Do not ask me how to pass variables to the Javascript block, I don't know.

Links

Author

gerdamigerdami. Please visit his/her userPage.


Related articles

Comments

Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.