Thanks. I didn't know of the onshow event for lens templates. I did notice that the onshow function is processed before the lens template is constructed. This makes sense, however, I have run into a case where the function should run after the lens template is constructed. In my case, using Lightbox. I got around this by using the setTimeout javascript function at 500ms, long enough for the lens to be created and short enough before a user could click on the link. Not ideal, of course, but it works. Any other ideas?
- John ************************************************** John Callahan, Geographic Information Scientist Delaware Geological Survey, University of Delaware URL: http://www.dgs.udel.edu ************************************************** On Thu, Jul 29, 2010 at 11:35 AM, martin <[email protected]> wrote: > Hi John, > I don't know if this would help you, I used the lens "OnShow" event > which then grabs a few variables from the database such as latitude > and longitude and passes them to a separate javascript function to > open a streetview window. > I still have a test page at http://courtenay.widget-it.com/park > > > On Jul 28, 1:20 pm, John Callahan <[email protected]> wrote: > > I'm looking to execute a function each time a user clicks on a marker > (and > > open an info window) in the Map View of Exhibit. I'd love it if the > > function can use one of the item attributes as an argument. This > function > > would populate another part of the screen based on the attributes of the > > marker clicked. Does anyone have an idea how to do this? > > > > An analogous example would be how the > > Exhibit.TabularView.prototype._reconstruct function is called whenever a > > facet is selected in the tabular view. (This is not quite the same since > I > > cannot pass attributes as arguments to my functions here.) I can execute > my > > own functions upon facet selection using something like: > > > > var oldTabularViewReconstruct = > Exhibit.TabularView.prototype._reconstruct; > > Exhibit.TabularView.prototype._reconstruct = function() { > > oldTabularViewReconstruct.call(this); > > myFunction(); > > > > }; > > > > Is there something similar for map marker clicks or infoWindow displays? > > Is there a way to create a onclick event listener globally for all map > > markers, hopefully one that passes an attribute? I have a local copy of > > Exhibit running so I can "hack core" is necessary. Thanks for any ideas. > > > > - John > > > > ************************************************** > > John Callahan, Geographic Information Scientist > > Delaware Geological Survey, University of Delaware > > URL:http://www.dgs.udel.edu > > ************************************************** > > -- > You received this message because you are subscribed to the Google Groups > "SIMILE Widgets" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<simile-widgets%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/simile-widgets?hl=en. > > -- You received this message because you are subscribed to the Google Groups "SIMILE Widgets" 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/simile-widgets?hl=en.
