On Mar 24, 10:20 pm, Alexander Gonzales <[email protected]> wrote: > Hello, good day: > I have a map with many markets, we talked about 20 markets. The > point is that I have external links to make you click, the maket > their deployment infoHTML (window). > > I have seen such > as:http://www.guiarte.com/mapas-google/desarrolloweb/enlaces-externos-co ... > But this case is because they are only 4 variables and can create and call > Certainly in my case is an inaccurate number of markets, to vaeces may be 20, > other 30, etc. > > Also my code to generate the markets not declare variable > variable, but use the same in a loop. > > for (var i = 0, i <arryalist.length i + +) ( > point = arryalist [i]. split (','); > > var point = new > GPoint (parseFloat (item [0]), parseFloat (item [1])); > > var html = "<h3>" + point [3 ]+"</ h3> <p> "+ point [4 ]+"</ p>"; > marker = createMarker (point, html); > map.addOverlay (marker); > bounds.extend (point); > ) > > createMarker function (point, html) ( > var marker = new GMarker (point); > GEvent.addListener (marker, "click", function () ( > marker.openInfoWindowHtml (html); > )); > return marker; > > ) > > Then come only use a variable inside a loop and when it is > asiganada a nearby market quickly add it to the map, and so SICES is > why can not I use independent variables for each market, I > fill them!. > > I know that for this external links should I use the function * GEvent.trigger > * (marker, 'click'), but even that is not specified as parameter "marker" > > Thanks in advance > Greetings
Options: 1. Like Mike Williams does in his tutorial: Part 2 Adding a clickable sidebar http://econym.org.uk/gmap/basic2.htm 2. Add your own id to the markers, store them in an "associative" array using that id as its index. -- Larry -- You received this message because you are subscribed to the Google Groups "Google Maps API" 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-api?hl=en.
