I would like to be able to programmatically geocode against my local Locator. I see the sample reference the online ESRI geocoding service but I don't see an example on how to do it with my locator offline. Is this possible? Is there an example/snippet?
What exactly are you trying to do? There are ways to programmatically geocode against a locator built off of your own data.
1. You can publish it as a geocoding service to ArcGIS Server. You can then use the geocoding REST APIs to perform geocoding
2. You can use the ArcGIS Runtime SDK for .NET.
3. You can use python and the geocoding geoprocessing tools such as GecodeAddresses (convert an address table to a featureClass)
Thanks for asking. I have an arcgispro business app that displays data in a dockpane that has address, city, and zip fields in it. I would like to be able to push a button and locate that data on a map and then do some other stuff. I would like to be able to do it offline and not have the expense of licensing arcgis runtime. So perhaps python is the only way for my situation? could you elaborate a little more? Thanks
If that data is in a table you can use the GeocodeAddresses geoprocessing tool to geocode that table which can be done using Python. That tool will create an output featureClass with the geocoding results which can be used for other analysis. Maybe even creating a model that had this tool strung together with other analysis tools would work for you.
thanks, i will play around with that it seems a little klugy. what i really want is a one line method passing in address and locator like the following sudo code
var pt = GetCoordinate("100 main st, Houston, TX 77002", "c:\Houston.loc")
Thanks for the feedback. At this point in time we don't have a programmatic way to geocode a single address against a local locator from within ArcGIS Pro. What would be the preferred way to do this in your situation? Would you be looking for something in the ArcGIS Pro SDK, something in Python, or maybe even something else?