[OpenLayers-Users] How obtain the vertex in openlayer

Marc Jansen jansen at terrestris.de
Thu Oct 8 17:26:46 EDT 2009


Argh, typo:

that code should read

...

  featureAdded: function( /* your code here */ ),

...

but of course this is still untested ;-)

Marc


Marc Jansen schrieb:
> 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
>>   
>>     
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>   




More information about the Users mailing list