it was very easy for me to implement a kml feed on my map, is there
any way i can display a bsb/kml overlay the same way? I downloaded
the map I want in .bsb + .kml format and I can host it myself (its not
encrypted.)
Here is the script I use to load the map. thanks =)
<script type="text/javascript">
google.load("maps", "3", {other_params:"sensor=false"});
google.load("jquery", "1.3.2");
function initialize() {
var myLatlng = new google.maps.LatLng(30.38800, -88.00000);
var myOptions = {
zoom: 8,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.HYBRID
}
var map = new
google.maps.Map(document.getElementById("map_canvas"), myOptions);
var ctaLayer = new google.maps.KmlLayer('http://mw1.google.com/mw-
earth-vectordb/disaster/gulf_oil_spill/kml/noaa/
nesdis_anomaly_rs2.kml');
ctaLayer.setMap(map);
$.get("retrieve.php", function(data) {
$(data).find("ReturnMessage").each(function() {
var marker = jQuery(this);
message = "<b><a href='../"+marker.find("Link").text()+"'
target='_blank'>Unit: "+marker.find("Unit").text()+"</a></b><br /
>"+"AdC: "+marker.find("AdC").text()+"<br />"+"Speed:
"+marker.find("Speed").text()+"<br />"+"Heading:
"+marker.find("Heading").text()+"<br />"+"Longitude:
"+marker.find("Longitude").text()+"<br />"+"Latitude:
"+marker.find("Latitude").text()+"<br />"+"Status:
"+marker.find("MessageStatus").text()+"
"+marker.find("MessageStatus").attr("time");
var latlng = new
google.maps.LatLng(parseFloat(marker.find("Latitude").text()),
parseFloat(marker.find("Longitude").text()));
var marker = new google.maps.Marker({position: latlng, map:
map});
var infowindow = new google.maps.InfoWindow(
{ content: message,
size: new google.maps.Size(50,50)
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map,marker);
});
});
}, 'xml');
}
google.setOnLoadCallback(initialize);
</script>
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.