kindly guide me how to get text values form point shape file and add it into comboBox. for example i have point layer now i want to add name (which against X , Y in shapefile) into combobox
Point shape text values
Hi Faryal,
You can use the following code to get all the text values of the layer,
Collection<Feature> features = layer.QueryTools.GetAllFeatures(ReturningColumnType.AllColumns);
foreach(var feature in features)
{
foreach(var item in feature.ColumnValues)
{
string columnName = item.Key;
string columnValue = item.Value;
}
}
Hope it helps,
Edgar
thanks Edgar it need lilltle help here.
i have POI name in textbox i want to plot it on map. i have also a shape file which contain POI name and there coordiantes
tell me how i plot POI on map through its name
Hi Faryal,
You can use this code,
layer.ZoomLevelSet.ZoomLevel01.DefatultTextStyle = TextStyles.City1("POI name");
Hope it helps,
Edgar
its means i do not need gecoding ?? i want that then i click on button that POI draw a point or marker on map
Is the text in textBox a shape's column value? If so, you should add the selected point to an InMemoryFeatureLayer,
InMemoryFeatureLayer inm = new InMemoryFeatureLayer();
inm.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.City1;
inm.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.City1("POI name");
inm.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
((LayerOverlay)winformsMap1.Overlays["Your overlay"]).Layers.Add("inm",inm);
private void OnClick(sender, e)
{
Collection<Feature> features = layer.QueryTools.GetFeaturesByColumnValue("POI Name", textBox.text);
InMemoryFeatureLayer inmLayer = (InMemoryFeatureLayer)((LayerOverlay)winformsMap1.Overlays["Your overlay"]).Layers["inm"];
foreach(var item in features)
{
inmLayer.InternalFeatures.Add(item);
}
winformsMap1.Refresh();
}
Hope it helps,
Edgar
hello
i want to select that point from shapfile whose name is in textbox.
i have my points shape file in winform now i have POI name in textbox or i entered POI name in textbox now i want to plot that point(or select ) on winform
i hope u get my point
i also used your geocoder but i cannot understand its error
Thanks Edgar i have solved my problem i way doing a small mistake with your sample code
thanks alot.
but kindly tell me how to used geocoder beacause sample code is for usageocoder. what if we have to make it our own
Thanks for your question!
Please check out our Map Suite Geocoder Quick Start Guide for instructions on how to start using the Map Suite Geocoder: wiki.thinkgeo.com/wiki/Map_S...tart_Guide
Please also note that we have a specific Map Suite Geocoder Discussion Forum for questions related to the Geocoder product.