Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle Maps: made changes, now map won't load
    primarykey
    data
    text
    <p>I had my Google map running just fine. I've been trying to get only one infowindow to open at once and in the process of doing that, broke my code. I am unable to get it back to a working stage at this point. I've gone through the code a dozen times and can't find anything wrong with it. I was basing my changes on <a href="https://stackoverflow.com/questions/1875596/have-just-one-infowindow-open-in-google-maps-api-v3">this article</a> on the stackoverflow forums.</p> <pre><code>&lt;script type="text/javascript"&gt; function initialize() { var infowindow new google.maps.InfoWindow(); var LatLng = new google.maps.LatLng(38.89, -92.343); var myOptions = { zoom: 13, mapTypeId: google.maps.MapTypeId.ROADMAP, center: LatLng }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); var bounds = new google.maps.LatLngBounds(); var Image = "images/wrenchIcon.png"; var Content = "blank"; var Head = "The Falls"; var cMarker = new google.maps.Marker({ position: LatLng, map: map, title: Head, icon: Image }) google.maps.event.addListenter(cMarker, 'click', function() { infowindow.setContent(Content); infowindow.open(map, cMarker); }); Image = "images/goodIcon.png"; LatLng = new google.maps.LatLng(38.912, -92.301); Content = "blank"; Head = "Bob TheBuilder"; var marker1 = new google.maps.Marker({ position: LatLng, map: map, title: Head, icon: Image }); google.maps.event.addListenter(marker1, 'click', function() { infowindow.setContent(Content); infowindow.open(map, marker1); }); bounds.extend(LatLng); Image = "images/alertYelIcon.png"; LatLng = new google.maps.LatLng(38.951, -92.332); Content = "blank"; Head = "Shiloh Bar&amp;Grill"; var marker2 = new google.maps.Marker({ position: LatLng, map: map, title: Head, icon: Image }); google.maps.event.addListenter(marker2, 'click', function() { infowindow.setContent(Content); infowindow.open(map, marker2); }); bounds.extend(LatLng); Image = "images/goodIcon.png"; LatLng = new google.maps.LatLng(38.92, -92.332); Content = "blank"; Head = "FlatBranch Pub"; var marker3 = new google.maps.Marker({ position: LatLng, map: map, title: Head, icon: Image }); google.maps.event.addListenter(marker3, 'click', function() { infowindow.setContent(Content); infowindow.open(map, marker3); }); bounds.extend(LatLng); &lt;/script&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload