<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thank you Andreas for clearing up that I should assign events like so:<div><br></div><div>events = map.events</div><div><br></div><div>The other part of this is that you have specify that the event you are triggering is a left-click.</div><div><br></div><div>By tracing the code you see that you need to set the "which" attribute to 1 in the object passed to triggerEvent(), otherwise onClick in featureclick.js ignores the event. </div><div><br></div><div>So, this is what my code should have looked like:</div><div><br></div><div>events = map.events;<br><div>events.triggerEvent( 'mousedown', {xy: new OpenLayers.Pixel(0,0), which: 1}, map);</div><div>events.triggerEvent('mouseup', {xy: new OpenLayers.Pixel(0,0), which: 1}, map);</div></div><div><br></div><div>I'm assuming I can get tests written today. Although, I'm not exactly clear how to submit them. If anyone wants to clue me in to that procedure I'd appreciate it.</div><div><br></div><div>-Mike</div><div><br><div><div><div>On May 21, 2013, at 5:21 PM, Michael Ryan <<a href="mailto:mr@mry4n.net">mr@mry4n.net</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">While I've understood I need to use trigger() somehow, I have been unsuccessful in implementing it. <div><br></div><div>I was using test for buttonclick as a reference: <a href="https://github.com/openlayers/openlayers/blob/master/tests/Events/buttonclick.html">https://github.com/openlayers/openlayers/blob/master/tests/Events/buttonclick.html</a></div><div><br></div><div>I would have assumed that within the context of the featurclick example</div><div><a href="https://github.com/openlayers/openlayers/pull/174/files">https://github.com/openlayers/openlayers/pull/174/files</a></div><div><br></div><div>I could have used something like </div><div><br></div><div>events = OpenLayers.Events(map, <span class="nb" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 134, 179); font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre; background-color: rgb(255, 255, 255); ">document</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre; background-color: rgb(255, 255, 255); ">.</span><span class="nx" style="margin: 0px; padding: 0px; border: 0px; color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre; background-color: rgb(255, 255, 255); ">getElementById</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre; background-color: rgb(255, 255, 255); ">(</span><span class="s2" style="margin: 0px; padding: 0px; border: 0px; color: rgb(221, 17, 68); font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre; background-color: rgb(255, 255, 255); ">"map"</span><span class="p" style="margin: 0px; padding: 0px; border: 0px; color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre; background-color: rgb(255, 255, 255); ">));</span></div><div><span class="p" style="margin: 0px; padding: 0px; border: 0px; color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre; background-color: rgb(255, 255, 255); ">events.triggerEvent({type: 'mousedown', xy: new OpenLayers.Pixel(0,0)}, map);
events.triggerEvent({type: 'mouseup', xy: new OpenLayers.Pixel(0,0)}, map);</span></div><div><br></div><div>But, apparently, that's wrong. </div><div><br></div><div>Am I trying to do something that isn't possible? I'm assuming I'm just implementing it wrong. Any thoughts?</div><div><br></div><div>-Mike</div><div><br><div><div>On May 20, 2013, at 5:04 PM, Michael Ryan <<a href="mailto:mr@mry4n.net">mr@mry4n.net</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I'll answer my question about triggering a buttonclick by saying, it looks like you use trigger() which takes coordinates as an argument as in this test:  <a href="https://github.com/drewwells/openlayers/blob/master/tests/Control/Measure.html">https://github.com/drewwells/openlayers/blob/master/tests/Control/Measure.html</a></blockquote></div><br></div></div></blockquote></div><br></div></div></body></html>