开发者

I need to add data to a Googlemaps plugin from dyve.net

I've downloaded a JQuery Google Maps plugin from Dyve.net http://www.dyve.net/jquery/?googlemaps and added it my site eg. http://www.uksail.co.uk/category/company/sailing-clubs. I've got no problem adding multiple locations with individual info boxes but want to add a URL and other info such as a phone number and address as well as a 'directions to and from' function to each individual one开发者_C百科. Please view source of the above linked page to see the example data that displays the Google map.

If someone could point me in the right direction t'd be much appreciated.


I've been working with the Google Maps JavaScript API, and it couldn't be easier to integrate. I don't think you'll need a jQuery plugin with all the examples they give you.

http://code.google.com/apis/maps/documentation/javascript/


Try changing txt:$(elem).attr("title") on line 26 of jquery-googlemaps.js to txt:$('.info',elem).html()

Then update your HTML "geo" elements to something like:

<div class="geo" title="Plym Yacht Club">
  <abbr class="latitude" title="50.361409"></abbr>
  <abbr class="longitude" title="-4.109227"></abbr>
  <div class="info">
    Location<br />
    Phone Number<br />
    Address<br />
    Etc...
  </div>
</div>

You're basically getting the info window html from the "info" div instead of the "title" attribute.

Also, make sure you're closing your <div class="geo"> tags.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜