Hi,

I can't seem to figure out how to measure a vector layer.

My layer looks like this:

var vectorLayer = new OpenLayers.Layer.Vector("Line Vectors", {
                        styleMap : sm,
                        eventListeners : {
                                "featuresadded" : dataLoaded
                        },                      
                });
var polygon = new OpenLayers.Control.DrawFeature(vectorLayer, 
                                                OpenLayers.Handler.Polygon, {
                                                        displayClass : 
'polyButton',
                                                        title : 'Add Polygon',
                                                        handlerOptions : {
                                                                style : sty
                                                        }
                                                });
editPanel.addControls([ polygon ]);

the example here: openlayers.org/dev/examples/measure.html

goes straight to this: 
new OpenLayers.Control.Measure(
                    OpenLayers.Handler.Path, {
                        persist: true,
                        handlerOptions: {
                            layerOptions: {styleMap: styleMap}
                        }
                    } 

How do I get this to work when I defined my polygon vector layer as a
OpenLayers.Control.DrawFeature? Any help would be appreciated.  Thanks!
Jonathan

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Measure-a-Vector-layer-tp6289410p6289410.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to