Sunday, 16 October 2011

Embeding Google Map Image API for blog and websites

To embed google map image of a place, city or a country you need to:



<img src="http://maps.googleapis.com/maps/api/staticmap?center=-15.800513,-47.91378&zoom=11&size=200x200&sensor=false">


  • now you have to just replace the bold text i have underlined in the above url with the latitude or longitude of the place you want to show on the map for example your home, office etc. if you don't know the coordinates just find the coordinates on google map OR pass the replace the text with place's name.
  • for example to show New Delhi on the map you should write




<img src="http://maps.googleapis.com/maps/api/staticmap?center=new delhi&zoom=11&size=200x200&sensor=false">
this will show:

  • if you wan,t to pass dynamic variable, just use following code:
<img src="http://maps.googleapis.com/maps/api/staticmap?center=<?php echo $placename; ?>&zoom=11&size=200x200&sensor=false">



How to embed google map on excel sheet, .xls



How to add Google Map on a spreadsheet


If you want to publish an excel sheet with google map on it you need to follow following simple steps for that:
1) log in to http://docs.google.com, using your gmail ID or any other valid e-mail ID.

2) click on create button on the left panel and choose spreadsheet option.

3) this will open an unsaved spreadsheet. now you can edit this sheet or you can import a spreadsheet from your computer by click on FILE and then IMPORT.

4) now you have a spreadsheet with one column having some places written in its cells. choose INSERT -&gt; GADGET -&gt; MAPS and add the map to spreadsheet. select range by clicking on the cells.
you have a spreadsheet with a map.
click on publish in order to put it on your webpage.


India Mapia

Saturday, 1 October 2011

How to embed google map on a blog

USING GOOGLE MAP IN BLOGGER

In this blog i will discuss how to embed simple google map in blogger.


  1. First you need to go to maps.google.com
  2. then search the place you want to display on your blog
  3. click on the link button on the top right corner, this will give you a short URL and an HTML snippet to paste on your website or blog.
  4. select the HTML link and paste this iframe on your blogger post. this will show the map as seen below in this blog post.






India Mapia