On Jan 15, 6:15 pm, allhen <[email protected]> wrote: > Hi, > > By default I load markers with onload="initialize('900143- > xmlV2.php');" > > And display in sidebar > > newHtml += '<a id="'+i+'" href="javascript:panTo('+setLat+', > '+setLng+', '+i+', '+setItemsZoom+')">'+setTitle+'</a><br />'; > > Display correctly this: > > <a href="javascript:panTo(1.111, 1.111, 0, 4)>Place 1</a> > <a href="javascript:panTo(2.222, 2.222, 1, 4)>Place 2</a> > <a href="javascript:panTo(3.333, 3.333, 2, 4)>Place 3</a> > <a href="javascript:panTo(4.444, 4.444, 3, 4)>Place 4</a> > <a href="javascript:panTo(5.555, 5.555, 4, 4)>Place 5</a> > > And if in select box is filtered by category or some text in searchbox > initialize('900143-xmlV2.php?a=cate1&b=sometext');" (Imagine that > return only 2 results.) xml is reloaded and markers are displayed > correctly and write this. > > <a href="javascript:panTo(3.333, 3.333, 0, 4)>Place 3</a> > <a href="javascript:panTo(4.444, 4.444, 1, 4)>Place 4</a> > > When click in new results displayed: > > New Place 3 is moved correctly to lat/long, but infowindow display > info from Place 1 > New Place 4 is moved correctly to lat/long, but infowindow display > info from Place 2 > > Problem is info() don't display new index array correctly. > > How can fix this? > > function panTo(lat, lng, i, zoom) > { > var darwin = new google.maps.LatLng(lat, lng); > map.panTo(darwin); > Info(i, zoom); > } > > function Info(i, zoom) { > if (infowindow) infowindow.close(); > google.maps.event.addListener(gmarkers[i], 'click', function() { > map.setZoom(zoom); > }); > google.maps.event.trigger(gmarkers[i],"click"); > > }
http://groups.google.com/group/google-maps-js-api-v3/t/2b3f101fd509919e http://groups.google.com/group/google-maps-api/web/why-including-a-link-is-critical -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
