jquery - How to center embedded Google Map -
i have fancybox loads remote page via ajax. page uses jquery tabs plugin. on tab not activated default there embedded google map. code calls google maps
<iframe width="740" height="380" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?z=16&t=m&q=<?= $geo['latitude'] ?>+<?= $geo['longitude'] ?>&hl=ru&output=embed"></iframe>
the result map shows searched location in top left corner. want center map in coordinates $geo['latitude']
, $geo['longitude']
.
i tried add different query parameters ll
, sll
, no success. tried set iframe preload setting of fancybox false - no result. should do?
consider following example:
<iframe width="740" height="380" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=museum+near+washington,+united+states&aq=0&sll=40.702863,-74.055748&sspn=0.025669,0.055747&ie=utf8&hq=museum&hnear=washington+d.c.,+district+of+columbia&ll=38.913976,-77.05111&spn=0.052698,0.111494&t=h&z=14&iwloc=a&cid=4718114823360363843&output=embed"></iframe>
play around ll
parameters center map.
also did have @ official google maps api ?
Comments
Post a Comment