It should work using the code below, I did the same (thanks to Greg and Arnd tips), I'm working from memory here but both var should go inside the Openlayers.class
Sent from my iBath On Mar 6, 2013, at 4:52, "Jerome A. Wendell" <jawend...@digitalmapping.com> wrote: I failed to add the following to my previous post: var geographic = new OpenLayers.Projection("EPSG:4326"); var mercator = new OpenLayers.Projection("EPSG:900913"); Thanks. From: openlayers-users-boun...@lists.osgeo.org [mailto:openlayers-users-boun...@lists.osgeo.org] On Behalf Of Jerome A. Wendell Sent: Tuesday, March 05, 2013 9:37 PM To: OpenLayers User List Subject: [OpenLayers-Users] Conversion of BBox for GetFeature Request I read several posts on this topic, and have attempted to convert the coordinates of the BBox from 900913 to 4326, which is the system for the layer the GetFeature request is posted for. The request is still being sent in 900913 coordinates, and no features are being returned. I am new to OpenLayers, and I have probably interpreted the information in the posts and the documentation incorrectly. Any suggestions that you may have concerning what I am doing wrong are greatly appreciated. The code that I am using is below: OpenLayers.Control.myGetFeature = OpenLayers.Class(OpenLayers.Control.GetFeature,{ selectBox: function(position){ var newbounds = new OpenLayers.Control.GetFeature.prototype.selectBox.apply(this, transform(mercator,geographic).toBBox(null,mybaselayer.reverseAxisOrder())); this.request(newbounds); }, CLASS_NAME: 'OpenLayers.Control.myGetFeature' }); var myControl = new OpenLayers.Control.myGetFeature({ protocol: OpenLayers.Protocol.WFS.fromWMSLayer(mylayer), box: false, hover: false, maxFeatures: 20 }); myControl.events.register("featureselected", this, function(e) { highlightLayer.addFeatures(e.features); }); myControl.events.register("featureunselected", this, function(e) { highlightLayer.removeFeatures(e.features); }); map.addControl(myControl); myControl.activate(); Thanks in advance for your help. _______________________________________________ Users mailing list us...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users
_______________________________________________ Users mailing list us...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users
_______________________________________________ Users mailing list us...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users