Tuesday, April 6, 2021

Setting up Google Map V3 with JQuery

Gmap 3   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&nbsp;show map something&nbsp;like
<div style="height:350px; width:600px" id="example"></div>

No comments:

Post a Comment