Posted By

ddavidd on 07/27/11


Tagged

google map api static


Versions (?)

Google Static Maps


 / Published in: JavaScript
 

URL: http://code.google.com/apis/maps/documentation/staticmaps

  1. /* Returns a static Google map image
  2.  * ie: http://maps.googleapis.com/maps/api/staticmap?center=41.156677,-87.877624&markers=color:485C59|label:A|41.156677,-87.877624&zoom=16&size=900x400&maptype=roadmap&sensor=true
  3.  */
  4. function getStaticMap(location, zoom, size, maptype, mcolor, mlabel, mlocation) {
  5. return "http://maps.googleapis.com/maps/api/staticmap?" +
  6. "center=" + location +
  7. "&zoom=" + zoom +
  8. "&size=" + size +
  9. "&maptype=" + maptype +
  10. "&sensor=true" +
  11. "&markers=color:" + mcolor +
  12. "|label:" + mlabel +
  13. "|" + mlocation";
  14. }

Report this snippet  

You need to login to post a comment.