[OpenLayers-Users] How do I get my polygon coordinates?
Kumar Mettu
mksreddy at yahoo.com
Wed Sep 10 10:44:12 EDT 2008
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--tp19413142p19414608.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list