Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Solved this one by creating a maker array and adding it to my scripting</p> <pre><code>var listings=[new google.maps.LatLng(43,-79),new google.maps.LatLng(43,-79),new google.maps.LatLng(43,-79)]; var names=['name 1','name 2','name 3']; var descriptions=['description 1','description 2','description 3']; var image = new google.maps.MarkerImage('/flag.png',new google.maps.Size(24,24),new google.maps.Point(0,0),new google.maps.Point(0,0)); var markers = []; var map; var box; function initialize() { var moptions = { zoom: 6, center: new google.maps.LatLng(43,-79), mapTypeId: google.maps.MapTypeId.ROADMAP, visible: true } var div = document.createElement('div'); var boptions = { content: div, disableAutoPan: false, maxWidth: 0, pixelOffset: new google.maps.Size(-140, 0), zIndex: null, boxStyle: { background: "url('tipbox.gif') no-repeat", opacity: 0.75, width: "280px" }, closeBoxMargin: "10px 2px 2px 2px", closeBoxURL: "http://www.google.com/intl/en_us/mapfiles/close.gif", infoBoxClearance: new google.maps.Size(1, 1), isHidden: false, pane: "floatPane", enableEventPropagation: false }; box = new InfoBox(boptions); for (var i = 0; i &lt; listings.length; i++) { var marker = new google.maps.Marker({ position: listings[i], map: map, draggable: false, icon: image, title: names[i] }); markers.push(marker); AttachMessage(marker, i); } } function AttachMessage(marker, number) { google.maps.event.addListener(marker, 'click', function() { box.close(); box.setContent(descriptions[number]); box.open(map, marker); }); } function OpenMessage(i) { google.maps.event.trigger(markers[i],'click'); }; </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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