Hello Where i can find sourcecode for finding objects on map in ArcEngine? i need this option in my application but in some modify typePlease help me It is very important!
IFeatureClass featureClass = featureLayerToSearch.FeatureClass; string filterClause = "Name = 'London'"; IQueryFilter queryFilter = new QueryFilterClass(); queryFilter.WhereClause = filterClause; IFeatureCursor featureCursor = featureClass.Search( queryFilter, true );
no, from arcmap i just take map templates... when i create standart arcengine app i add to toolbox elements such as map inquiry// find ... when i built app and click on button find ---> a little window appears where i can write name of city which i want find, etc. so i need smth like this "find" but modify a little..)) i think you understand me 🙂
Don't really know about ArcMap. I only use ArcEngine. So I can't offer direction on the ArcMap user interface. I thought you wanted help on ArcEngine programming.If you want programming help then look up IFeatureCursor:http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/IFeatureCursor_Interface/0025000002vs000000/
😮 thank you but how i can iterate thru records..? and can i write the city's name in textbox? i try do this with textbox but not successful
This is how you do a search to return an IFeatureCursor so you can iterate thru the found records: IFeatureClass featureClass = featureLayerToSearch.FeatureClass; string filterClause = "Name = 'London'"; IQueryFilter queryFilter = new QueryFilterClass(); queryFilter.WhereClause = filterClause; IFeatureCursor featureCursor = featureClass.Search( queryFilter, true ); Read up on each of these objects and you should be able to figure out how to vary your code to get what you want.
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.