Is there a .NET 4.0 VB example of how to search for a field in a .shp file's corresponding .dbf file and have the map zoom to the associated area of that record in the shape file?
Thanks
John G.
Is there a .NET 4.0 VB example of how to search for a field in a .shp file's corresponding .dbf file and have the map zoom to the associated area of that record in the shape file?
Thanks
John G.
Hi, John
Yes, we do support that.
You can find the related “ZoomToAClickedFeature” sample in the NavigateTheMap folder of our installed samples.
By default, and it will zoom to the clicked country which user has expected. Maybe your scenario is different, but I guess the GetFeaturesByColumnValue method could help you with that.
For example, if you want to search for associated area related with the “CNTRY_NAME” field with value of “United States”, and you call it like the code below:
features = worldLayer.QueryTools.GetFeaturesByColumnValue("CNTRY_NAME", "United States");
And then get the bounding box for the features collection and set the CurrentExtent of Map to it.
If you have additional question about it or I misunderstand your meaning please let us know.
Thanks,
Khalil