[OpenLayers-Dev] Testing
Michael Ryan
mr at mry4n.net
Tue May 21 14:21:01 PDT 2013
While I've understood I need to use trigger() somehow, I have been unsuccessful in implementing it.
I was using test for buttonclick as a reference: https://github.com/openlayers/openlayers/blob/master/tests/Events/buttonclick.html
I would have assumed that within the context of the featurclick example
https://github.com/openlayers/openlayers/pull/174/files
I could have used something like
events = OpenLayers.Events(map, document.getElementById("map"));
events.triggerEvent({type: 'mousedown', xy: new OpenLayers.Pixel(0,0)}, map);
events.triggerEvent({type: 'mouseup', xy: new OpenLayers.Pixel(0,0)}, map);
But, apparently, that's wrong.
Am I trying to do something that isn't possible? I'm assuming I'm just implementing it wrong. Any thoughts?
-Mike
On May 20, 2013, at 5:04 PM, Michael Ryan <mr at mry4n.net> wrote:
> 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: https://github.com/drewwells/openlayers/blob/master/tests/Control/Measure.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20130521/b6997fea/attachment.html>
More information about the Dev
mailing list