I'm new to the Google Maps API v3 and have been closely reading the documentation.
My map loads fine, but it's not displaying the Placemarks I've set up in my KML file (http://hepac.ca/wp-content/mapping/wellnessnetworks.kml). The KML validates fine at FeedValidator and displays without issue in Google Earth, so I'm assuming it's a problem with my code below.
The placemarks were appearing at one point, but I must have accidentally deleted some crucial code. Thanks in advance for helping!
function initialize() {
var mapcenter = new google.maps.LatLng(46.36209, -64.73145);
var mapOptions = {
zoom: 7,
center: mapcenter,
mapTypeId: google.maps.MapTypeId.ROADMAP,
};
google.maps.visualRefresh = true;
var map = new google.maps.Map(document.getElementById("map-canvas"),mapOptions);
var opt = { minZoom: 7, maxZoom: 9 }; // Sets minimum & maximum zoom level
map.setOptions(opt);
var ctaLayer = new google.maps.KmlLayer({
url: 'http://hepac.ca/wp-content/mapping/wellnessnetworks.kml',
preserveViewport: true,
});
ctaLayer.setMap(map);
}
google.maps.event.addDomListener(window, 'load', initialize);