Wednesday, September 14, 2011

setting up gmap3

gmap3 is a jquery plugin for google map api version3(V3)

Include the google script in your page
<script type="text/javascript" 
src="http://maps.google.com/maps/api/js?sensor=false"></script>


then gmap3 plugin (download it from Download Gmap3.js)
<script type="text/javascript" src="gmap3.min.js"></script>

once dom is ready you can use gmap3,

$(document).ready(function(){
  
  $("#example").gmap3();
  
});


dont forget to define height & width of div you are using to 
show map something 
like <div style="height:350px; width:600px" id="example"></div> 
 
 



No comments:

Post a Comment