[OpenLayers-Users] How do I get my polygon coordinates?

Bijoy bijoya at rediff.co.in
Thu Sep 11 01:32:30 EDT 2008


Thanks Kumar...
But, am already using Polygon Handler in the Drawfeature control
constructure. How do i combine both the constructor to get the "done"
command.
Can anyone help me?
<BIJOY>


Kumar Mettu wrote:
> 
> Bijoy,
> 
>   Have you tried using Polygon Handler Constructor?
>  
> http://dev.openlayers.org/releases/OpenLayers-2.6/doc/apidocs/files/OpenLayers/Handler/Polygon-js.html
> 
>   This should answer your question. 
> 
> Kumar.
> 
> Bijoy wrote:
>> 
>> Thanks for the reply.. Salvaro,
>> 
>> Can we call a function 'oncomplete' or 'done' of drawing a polygon. And,
>> then may be I want to get the polygon coordinates. User completes the
>> polygon drawing by doubleclicking.
>> I am using the below URL as example:
>> http://openlayers.org/dev/examples/select-feature.html
>> 
>> <BIJOY>
>> 
>> 
>> Salvaro wrote:
>>> 
>>> 
>>> geometry.getBounds().getCenterLonlat() ?
>>> 
>>> Salvaro.
>>> 
>>> 
>>> Bijoy wrote:
>>>> 
>>>> 
>>>> Hey,
>>>> I am drawing a polygon using the handler as shown below:
>>>> 
>>>> 	polycontrol = new OpenLayers.Control.DrawFeature(vectors,
>>>> OpenLayers.Handler.Polygon);
>>>> 	map.addControl(polycontrol);
>>>> 	polycontrol.activate();
>>>> 
>>>> Now, how do I get polygon coordinates when I finish drawing the
>>>> polygon?
>>>> 
>>>> -- 
>>>> View this message in context:
>>>> http://www.nabble.com/How-do-I-get-my-polygon-coordinates--tp19413142p19413142.html
>>>> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>>>> 
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at openlayers.org
>>>> http://openlayers.org/mailman/listinfo/users
>>>> 
>>>> 
>>> 
>>> -- 
>>> View this message in context:
>>> http://n2.nabble.com/How-do-I-get-my-polygon-coordinates--tp1079900p1079911.html
>>> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>>> 
>>> _______________________________________________
>>> Users mailing list
>>> Users at openlayers.org
>>> http://openlayers.org/mailman/listinfo/users
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-do-I-get-my-polygon-coordinates--tp19413142p19428140.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list