Hello,

 

I would like to transform coordinates of every point of a polygon feature 
drawned by the user using the polygon measure tool. In a function a get the 
geometry:

 

for (var lyr=0; lyr < map.layers.length; ++lyr){

                  var layer = map.layers[lyr];

                  if(layer.CLASS_NAME=="OpenLayers.Layer.Vector"){

                        alert('toString 
'+layer.features[0].geometry.toString());

                  }

}

 

The alert shows a message like this: 
POLYGON((295568,4706540,469875,4690960,443475,4589500,307175,4592100,295568,4706540))
 for a polygon drawned by the client user width 4 corners.

 

How can I get every pair of coordinates to send to getViewPortPxFromLonLat? so 
that I need pixels coordinates of every point.

 

Thanks in advance

 

Antoni Vidal

Institut Cartogràfic de Catalunya    Tel: +34-93 567 1500 Ext. 3228

Parc de Montjuïc                             Fax: +34-93 567 1567

08038 Barcelona                            http://www.icc.cat 
<http://www.icc.cat/> 

Spain

 

_______________________________________________
Dev mailing list
Dev@openlayers.org
http://openlayers.org/mailman/listinfo/dev

Reply via email to