jansen, I need that, when I finished to draw polygon, execute one function to obtain the list of the vertex
after that I like to pass this list vertex to sql consult for obtain the object inside this polygon. excuse my English. regards Salas ----- Original Message ----- From: "Marc Jansen" <[email protected]> To: "fsalas" <[email protected]> Cc: <[email protected]> Sent: Thursday, October 08, 2009 4:22 PM Subject: Re: [OpenLayers-Users] How obtain the vertex in openlayer > Hi salas, > > I'm not quite sure if I understand what you mean. I'd guess you want a > function that is called right after a feature is added via the control, > right? > > Use the "featureAdded"-property then: > > var drawpolygon = new OpenLayers.Control.DrawFeature( > featureAdded: function( /* your code here */ ). > polygonLayer, OpenLayers.Handler.Polygon, > {displayClass: 'olControlDrawFeaturePolygon'} > ); > > Regards, > Marc > > > fsalas schrieb: >> Hi, >> I need obtain the list of the vertex of my polygon becouse after that I >> need to pass this value to POLYGON parameters and obtain all the objects >> inside the polygon. >> I use this >> . >> . >> . >> . >> var drawpolygon = new OpenLayers.Control.DrawFeature( >> polygonLayer, OpenLayers.Handler.Polygon, >> {displayClass: 'olControlDrawFeaturePolygon'} >> ); >> panel.addControls([new OpenLayers.Control.Navigation(), drawpolygon]); >> .. >> . >> . >> . >> ************************************************************* This is >> the Sql for postgis ************************** >> SELECT cod,tipo,empresa,the_geom >> FROM sennal >> WHERE sennal.the_geom && GeomFromText('POLYGON((-85.47677 >> 23.56344,-82.31771 23.51950,-82.33468 21.03659,-85.47677 >> 23.56344))',4267) and tipo = 'FV'; >> ********************************************************* >> How implement this ? >> Regards , salas >> var drawpolygon = new OpenLayers.Control.DrawFeature( >> polygonLayer, OpenLayers.Handler.Polygon, >> {displayClass: 'olControlDrawFeaturePolygon'} >> ); >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://openlayers.org/mailman/listinfo/users >> > > _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
