Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- $.fn.googlemap = function(){
- // author: Christian Salazar <christiansalazarh@gmail.com>
- var src='';
- $(this).each(function(){
- var z = $(this);
- var address = jQuery.trim(z.attr('streetnumber'))
- +'+'+jQuery.trim(z.attr('streetname'))
- +'+'+jQuery.trim(z.attr('cityname'))
- +'+'+jQuery.trim(z.attr('statecode'))
- +'+'+jQuery.trim(z.attr('zipcode'))
- ;
- src="https://maps.google.com/maps?"
- +"client=safari"
- +"&q="+address
- +"&oe=UTF-8&ie=UTF8&hq="
- +"&hnear="+address
- +"&gl=us"
- +"&z="+z.attr('zoom')
- +"&output=embed";
- z.html("<iframe src='"+src+"' width="+z.attr('width')+" height="
- +z.attr('height')+"></iframe>");
- });
- return src;
- }
- </script>
- <?php
- /*
- <div id='mapa' streetnumber='946' streetname='LAKE+DESTINY+RD'
- cityname='ALTAMONTE+SPRINGS' statecode='FL' zipcode='32714'
- zoom=18 width=500 height=300>
- </div>
- <script>$('#mapa').googlemap();</script>
- */?>
Add Comment
Please, Sign In to add comment