[OpenLayers-Users] How obtain the vertex in openlayer

fsalas fsalas at geocuba.cu
Sat Oct 10 15:47:41 EDT 2009


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" <jansen at terrestris.de>
To: "fsalas" <fsalas at geocuba.cu>
Cc: <users at openlayers.org>
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
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>
> 





More information about the Users mailing list