Note that there are some explanatory texts on larger screens.

plurals
  1. POinfowindow related to marker google map
    primarykey
    data
    text
    <p>i have create a code to show the cluster marker using google map V3 the problem is in the <code>infowindow</code> for each marker. i think the bug is that in every iteration of the boucle the reinitialize the content of the other marker and just save the last inserted.</p> <p>here is my essay...</p> <p><a href="http://www.ermes.net/user/loadscrolling/load_first.php" rel="nofollow">http://www.ermes.net/user/loadscrolling/load_first.php</a></p> <p>thanks for help</p> <pre><code> &lt;script type="text/javascript"&gt; function initialize() { var center = new google.maps.LatLng(37.4419, 9.1419); var map = new google.maps.Map(document.getElementById('map'), { zoom: 2, center: center, mapTypeId: google.maps.MapTypeId.ROADMAP }); var tweets = &lt;?php echo json_encode($mapLocations); ?&gt;; var markers = []; &lt;? for ($j=0; $j&lt;count($resultArrayAd); $j++) { ?&gt; var i=&lt;?=$j++?&gt;; var latLng = new google.maps.LatLng(parseFloat(&lt;?=$resultArrayAd[$j]['Lat']?&gt;),parseFloat(&lt;?=$resultArrayAd[$j]['Lng']?&gt;)); &lt;? $userList2 = new user_account($resultArrayAd[$j]["user_id"]); $user_avatar2=$userList2-&gt;get_avatar(); $path2 =enleveaccents($user_avatar2-&gt;get_document_filename()); $user_nick=enleveaccents($resultArrayAd[$j]["user_name"]); $user_id=$resultArrayAd[$j]['user_id']; $usr_details = new user_details($user_id); if (strlen($path2) &gt; 0) { $path_img= "/images/thumb_".$path2; } else { $path_img = "/img/avatar_profilo.jpg"; } ?&gt; var contentString = '&lt;table&gt;&lt;tr&gt;&lt;td width="350"&gt;'+ '&lt;a href="/user/&lt;?=$user_id?&gt;/&lt;?=$user_nick?&gt;.html" target="_top"&gt;'+ '&lt;img align=left width=100 height=65 border=0 src="&lt;?=$path_img?&gt;" hspace=4 vspace=2&gt;'+ '&lt;font size=1 face=verdana&gt;&lt;b&gt;&lt;?=$user_nick?&gt;&lt;/b&gt;&lt;/font&gt;&lt;/a&gt;&lt;br/&gt;'+ '&lt;span style="color:#555555;font-size:12px;line-hieght:13px;"&gt;'+ '&lt;b&gt;Indirizzo:&lt;/b&gt;&lt;br/&gt;' + '&lt;b&gt;Tel:&lt;/b&gt; &lt;br/&gt;'+ '&lt;/span&gt;'+ '&lt;div class="clearBoth"&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;'+ '&lt;div class="clearBoth"&gt;&lt;/div&gt;'; var infowindow = new google.maps.InfoWindow({ content: contentString }); var marker = new google.maps.Marker({ position: latLng, map: map, icon:"&lt;?=$resultArrayAd[$j]['user_icon']?&gt;", title:"&lt;?=$user_nick?&gt;", }); google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,marker); }); markers.push(marker); &lt;? } ?&gt; var markerCluster = new MarkerClusterer(map, markers); } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt; </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. 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