i'm new google maps api v3 , have been closely reading documentation.
my map loads fine, it's not displaying placemarks i've set in kml file (http://hepac.ca/wp-content/mapping/wellnessnetworks.kml). kml validates fine @ feedvalidator , displays without issue in google earth, i'm assuming it's problem code below.
the placemarks appearing @ 1 point, must have accidentally deleted crucial code. in advance 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);
if want have more 1 placemark in kml file, need in document or folder:
<kml>
can contain 0 or 1 feature elements
<document>
can contain 0 or more feature elements
Comments
Post a Comment