[OpenLayers-Users] OpenLayers.Class with OpenLayers.Control.GetFeature

Gery . gamejihou at hotmail.com
Wed Jan 30 07:56:46 PST 2013


I forgot to say that I'm using version 2.11.

__________________________________________________________________________________________
Piensa en el medio ambiente - mantenlo en la pantalla. NO lo imprimas si NO es necesario.
Think green - keep it on the screen. Do NOT print if it is NOT necessary.
Denken Sie an die Umwelt - bewahren Sie es auf dem Bildschirm. Drucken Sie es NICHT, wenn es NICHT notwendig ist.


From: gamejihou at hotmail.com
To: openlayers-users at lists.osgeo.org
Date: Wed, 30 Jan 2013 15:52:20 +0000
Subject: [OpenLayers-Users] OpenLayers.Class with	OpenLayers.Control.GetFeature




Hi all,

I'm wondering if someone could point me in the right direction to force the BBOX of OpenLayers.Control.GetFeature to be always in long/lat coordinates. I'm trying to get this with OpenLayers.Class, so the new control will inherit OpenLayers.Control.GetFeature with just the small modification in BBOX. This is what I've done:

OpenLayers.Control.myGetFeature = OpenLayers.Class(OpenLayers.Control.GetFeature,{

            selectBox: function(position){

                var opts = OpenLayers.Control.GetFeature(position);

                var baseSRSutm = this.map.getprojectionObject();

                var layerSRSdd = new OpenLayers.Projection('EPSG:4326');

                opts.params.bbox = 
this.map.getExtent().transform(baseSRSutm,layerSRSdd).toBBOX(null,firstLayer.reverseAxisOrder());

            }
            return opts;

        });

 
but I'm getting that some "}" are missing. Is this the right way to use OpenLayers.Class to do what I want?

Any help is much appreciated.

Gery


__________________________________________________________________________________________
Piensa en el medio ambiente - mantenlo en la pantalla. NO lo imprimas si NO es necesario.
Think green - keep it on the screen. Do NOT print if it is NOT necessary.
Denken Sie an die Umwelt - bewahren Sie es auf dem Bildschirm. Drucken Sie es NICHT, wenn es NICHT notwendig ist.
 		 	   		  

_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130130/39e05ad4/attachment.html>


More information about the Users mailing list