sharpmap
lakku
veeraswamyd at YAHOO.CO.IN
Thu Nov 15 02:25:07 PST 2007
hi all
plz tell me the code for identify , for mutiple layers in SHARPMAP
ie when user clicks on the map ,data related to that particular point must
me displayed on the grid
i worked with only single layer ie polygon but i want code for line and
point features also
my code for single layer is
SharpMap.Geometries.
Point ClickPnt = myMap.ImageToWorld(new System.Drawing. Point(e.X, e.Y));
if (rblMapTools.SelectedValue == "3") //Query
{
SharpMap.Data.
FeatureDataSet ds = new SharpMap.Data.FeatureDataSet ();
VectorLayer layer = myMap.Layers[0] as SharpMap.Layers. VectorLayer;
layer.DataSource.Open();
layer.DataSource.ExecuteIntersectionQuery(ClickPnt.GetBoundingBox(), ds);
layer.DataSource.Close();
gridview1.DataSource = ds.Tables[0];
gridview1.DataBind();
SharpMap.Layers.
VectorLayer laySelected = new SharpMap.Layers. VectorLayer("Selection");
laySelected.DataSource =
new GeometryProvider(ds.Tables[0]);
laySelected.Style.Fill =
new System.Drawing.SolidBrush(System.Drawing. Color.Pink);
myMap.Layers.Add(laySelected);
}
plz tell me the code for multiple layers(line,point)
--
View this message in context: http://www.nabble.com/sharpmap-tf4810997.html#a13765074
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the MapServer-users
mailing list