<div dir="ltr">Hey Michael,<div><br></div><div style>you should find all information on how to submit code here: <a href="http://trac.osgeo.org/openlayers/wiki/HowToContribute">http://trac.osgeo.org/openlayers/wiki/HowToContribute</a>. You will want to create a pull request, as explained here: <a href="http://trac.osgeo.org/openlayers/wiki/CreatingPatches">http://trac.osgeo.org/openlayers/wiki/CreatingPatches</a>.</div>
<div style><br></div><div style>I hope this helps.</div><div style><br></div><div style>Andreas.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 22, 2013 at 9:34 AM, Michael Ryan <span dir="ltr"><<a href="mailto:mr@mry4n.net" target="_blank">mr@mry4n.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">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><div class="h5"><div><br><div><div><div>On May 21, 2013, at 5:21 PM, Michael Ryan <<a href="mailto:mr@mry4n.net" target="_blank">mr@mry4n.net</a>> wrote:</div><br><blockquote type="cite">
<div style="word-wrap:break-word">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" target="_blank">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" target="_blank">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 style="line-height:18px;color:rgb(0,134,179);font-size:12px;white-space:pre-wrap;font-family:Consolas,'Liberation Mono',Courier,monospace;margin:0px;border:0px;padding:0px">document</span><span style="line-height:18px;color:rgb(51,51,51);font-size:12px;white-space:pre-wrap;font-family:Consolas,'Liberation Mono',Courier,monospace;margin:0px;border:0px;padding:0px">.</span><span style="line-height:18px;color:rgb(51,51,51);font-size:12px;white-space:pre-wrap;font-family:Consolas,'Liberation Mono',Courier,monospace;margin:0px;border:0px;padding:0px">getElementById</span><span style="line-height:18px;color:rgb(51,51,51);font-size:12px;white-space:pre-wrap;font-family:Consolas,'Liberation Mono',Courier,monospace;margin:0px;border:0px;padding:0px">(</span><span style="line-height:18px;color:rgb(221,17,68);font-size:12px;white-space:pre-wrap;font-family:Consolas,'Liberation Mono',Courier,monospace;margin:0px;border:0px;padding:0px">"map"</span><span style="line-height:18px;color:rgb(51,51,51);font-size:12px;white-space:pre-wrap;font-family:Consolas,'Liberation Mono',Courier,monospace;margin:0px;border:0px;padding:0px">));</span></div>
<div><span style="line-height:18px;color:rgb(51,51,51);font-size:12px;white-space:pre-wrap;font-family:Consolas,'Liberation Mono',Courier,monospace;margin:0px;border:0px;padding:0px">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" target="_blank">mr@mry4n.net</a>> wrote:</div><br><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" target="_blank">https://github.com/drewwells/openlayers/blob/master/tests/Control/Measure.html</a></blockquote>
</div><br></div></div></blockquote></div><br></div></div></div></div></div><br>_______________________________________________<br>
Dev mailing list<br>
<a href="mailto:Dev@lists.osgeo.org">Dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Andreas Hocevar<br>OpenGeo - <a href="http://opengeo.org/">http://opengeo.org/</a><br>Expert service straight from the developers.<br>
</div>