select a feature by drawing a circle and selecting the contents

المشرف العام

Administrator
طاقم الإدارة
Using openLayers Two....Select a feature with a circle select tool....Is this possible?

I can draw a circle polygon on the map using a regularPolygon with 100 sides :

g_vectorTable[layerIndex].editControls.PlaceFeature['circle'] = new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.RegularPolygon, {handlerOptions: { sides: 100}, featureAdded: funcFeatureAdded, beforefeatureadded: funcBeforeFeatureAdded });I can use a box select to drag the mouse in the shape of a box. Which will highlight the feature inside the box.

var controlOptions = { protocol: OpenLayers.Protocol.WFS.fromWMSLayer(layer, { outputFormat: "JSON", readFormat: new OpenLayers.Format.GeoJSON() }), box: true, clickTolerance: 10, clickout: true, toggle: false, click: true, hover: false, filterType: OpenLayers.Filter.Spatial.INTERSECTS//, }; } g_vectorTable[layerIndex].editControls.selectFeature = new OpenLayers.Control.GetFeature(controlOptions);But my Q being how can I use a circle select, to drag the mouse in the shape of a circle and select the feature inside it?



أكثر...
 
أعلى