> I am a bit lost at how in Mike's version of the linkTo how the "label" in
> his XML becomes the "id"
I'm not sure which example you're talking about, but regardless - you
can assign a variable (in this case id) whatever value you like (in
this case label). The point here is having a unique reference so that
the code will know which marker you are talking about when you say
that you want to open the infowindow on marker x
> I think I understand the general premise of what is happening.
>
> - check for arguments
yep
> - if arguments exists make the map
maybe - depending on the example. the ones that I have seen make the
map regardless and if the arguments exist do something with the marker
(like open an infowindow
> - based on arguments open infowindow with data
yep
> - use the arguments to create a link in the infowindow (for direct
> linking)
sounds about right. It's a fairly simple, logical process if you
follow the flow of it.
I made a couple of demo pages just for the fun(!) of it, with thanks
to Larry and Mike:
http://www.xelawho.com/map/markurl.htm
http://www.xelawho.com/map/markurl2.htm
the first one works fine if there are a set number of markers, but
once you add markers to the list you have to recalculate which url
points to which marker
the second one solves that problem by using the title attribute (which
I guess would be kind of unique) to keep track of which marker is
getting called by the url.
but I had a question here: I use the "tilesloaded" listener to wait
until the markers are on the map before executing the "click" event on
one, but I don't know how the API loads when working with a database -
if the markers are getting made from external data is this good
enough, or is there some other, all-purpose API method to make sure
all the data is in before calling a function? Or does it depend on the
method you're using to get the data in the first place?