-
-
Examples Continued for Google Maps jQuery Plugin
-
We even map marker files
Marker files are a synch and its a format recognized by maps…
And it goes a little like this:
<?xml version="1.0" encoding="UTF-8"?> <markers> <marker location="Bodmin" lat="50.47133" lng="-4.71762" /> <marker location="Bude" lat="50.82359" lng="-4.54149" html="Bude More stuff" /> <marker location="Callington" lat="50.50344" lng="-4.31553" /> <marker location="Coverack Headland" lat="50.02437" lng="-5.09755" /> <marker location="Falmouth" lat="50.15599" lng="-5.07106" html="Some form of text" /> </markers>
Which Give us…
var XMLMapping = {markerxml: "http://chrismckee.co.uk/labs/jquery/maps/markers-hotspots.xml", zoom:8}; $("#addressmarkerfile").fuGMAP(XMLMapping);
The marker file contains a html attribute; if this is present the item will be used as an InfoWindow for the marker.
We can even add manual elements
var XMLMappingB = { controls: false, popup: "text", markerxml: "http://chrismckee.co.uk/labs/jquery/maps/markers-hotspots.xml", markers:[{address: "Weymouth, UK"}, {address: "Bristol, UK", url: "http://google.com"} ]}; $("#addressmarkerb").fuGMAP(XMLMappingB);
Any requests, just let me know. And I’d love to know how you use this
)Ta, Chris
-

