On Apr 22, 10:47 am, Ayar <[email protected]> wrote: > Hi there! > I'm working on a map which connects to a mysql db and generate an xml > from where to create markers. > > As you can see inhttp://sinca.cultura.gov.ar/sic/x/res.phpthe xml is > being created succesfully and markers are shown as expected. > > The challenge here is: > I want the xml being called not onLoad, but when clicking on a JS > link. > So, I create the function genxml() and it works great. The xml is > being generated but NOT markers are shown. > > The error: > Object doesn't support this property or method, apparently associated > to this line: > map.addOverlay(marker); > > The url :http://sinca.cultura.gov.ar/sic/x/res2.php
Your map variable is local to your load function so it is not available after that function finishes... See this explanation from Mike Williams' tutorial: Part 1 Scope http://econym.org.uk/gmap/scope.htm -- Larry > > I would really appreciate your help. > Txs in advance. > Ayar > > -- > 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 > athttp://groups.google.com/group/google-maps-api?hl=en. -- 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.
