Select to view content in your preferred language

Can I use an Address Locator on the hard drive or query attributes via vb.net app?

1652
10
01-27-2011 05:28 AM
DonnaBest
Deactivated User
We have users in the field on laptops.   Sometimes their air cards are slow or they hit a dead spot, etc.   ArcGISExplorer provides internet services but can also use layers stored on their hard drive.  For times when using the internet services or our network services isn't convenient, I'd like to provide them the ability to search for an address quickly using only their hard drive.

Can I build an address locator on their hard drive for them to use when they need to?   Or can I write a vb.net custom app to prompt them for an address and search on a layer's attribute?

Thank you!
Donna
0 Kudos
10 Replies
MichaelBranscomb
Esri Frequent Contributor
Donna,

Unfortunately you can't plug a local address locator into the OOTB address search tool in Explorer. However, as you suggest, you could write a VB.NET or C# Add-in which would prompt the user for one or more pieces of address info then search a FeatureClass / Table in a geodatabase.

See the Table.Search method for more information: http://help.arcgis.com/en/arcgisexplorer/1500/sdk/componenthelp/index.html#/d/0003000008v6000000.htm

Regards

Mike
0 Kudos
DonnaBest
Deactivated User
Thank you Mike - that looks like one of the resource links I've been looking for, I appreciate it!

So, conceptually, I can set up a map that is totally standalone - local shape files - .net tools for address locators and perhaps a directions finder -   then I can set up a separate map with shape files located on our SDE, using the out-of-the-box tools, etc.  ....  yes?

Thank you -
Donna
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Donna,

Yes that's pretty much it. The best way to achieve an online/offline environment is probably via Application Configurations - which are self contained packages containing a map and any customisations such as custom Add-ins (for more info see http://webhelp.esri.com/arcgisexplorer/1500/en/appconfig_manager.htm).

One thing you'll obviously want to consider is how you ensure you're got the latest data on your Explorer machines so I'd recommend thinking about a utility to get the latest data from your ArcSDE database.

By the way - in terms of file-based data I'd advise moving away from Shapefiles to using File Geodatabases because they're more efficient for data storage/display/query particularly as the size of your data increases.

Regards

Mike
0 Kudos
charlieLatchford
Emerging Contributor
Donna,

Did you get this to work as iam thinking about doing the same for some of our Explorer users.. Why don't ERSI build this into an option Application Configuration Manger?
0 Kudos
DonnaBest
Deactivated User
Mike - 

I've written an add-in the will search on addresses or intersections and then zoom them to the point on the map.  But the zoom level is always the same and is too far in...  

I was trying to adjust the zoom level using the ZoomLayer method...  We'd like it to zoom into Street level.  Any helps?  (my piece of code is below)

Thank you Mike!

Donna

Dim addressTable As Table = gdb.OpenTable("Addresses")
            searchFilter.WhereClause = "ADDR_ALL = '" + AddressString + "'"


            Dim ResultRows As RowCollection = addressTable.Search(searchFilter)

            For Each address As Row In ResultRows
                Dim geom As Geometry = address.Geometry
               
                'md.ZoomTo(geom)
                ZoomTo(geom, ZoomLevel.State)

                Dim gr As Graphic = New Graphic(address.Geometry, Symbol.Marker.Pushpin.Red)
                Application.ActiveMapDisplay.Graphics.Add(gr)




Donna,

Yes that's pretty much it. The best way to achieve an online/offline environment is probably via Application Configurations - which are self contained packages containing a map and any customisations such as custom Add-ins (for more info see http://webhelp.esri.com/arcgisexplorer/1500/en/appconfig_manager.htm).

One thing you'll obviously want to consider is how you ensure you're got the latest data on your Explorer machines so I'd recommend thinking about a utility to get the latest data from your ArcSDE database.

By the way - in terms of file-based data I'd advise moving away from Shapefiles to using File Geodatabases because they're more efficient for data storage/display/query particularly as the size of your data increases.

Regards

Mike
0 Kudos
DonnaBest
Deactivated User
Charlie -

I've written a little vb.net app to provide them the ability to search from the package layer file or gdb table file on their hard drive.   I'm new at all this so it may not be very well written - but I'll be happy to share this with you if would like.

But I can't seem to get it to zoom to  whatever layer or 'altitude' is equivalent to the Zoom To Street level from the Map ZoomTo dropdown.   Any ideas?

Donna,

Did you get this to work as iam thinking about doing the same for some of our Explorer users.. Why don't ERSI build this into an option Application Configuration Manger?
0 Kudos
charlieLatchford
Emerging Contributor
Hi Donna

Iam pretty new to this aswell.. it would be a great help if you where to sharing the code and i can play around with the zoom etc..

thanks charlie
0 Kudos
DonnaBest
Deactivated User
Hi Charlie -

I'll try to attach the solution I zipped.  It's in vb.net 2010.  It's not very good 🙂  but any help you can give would just be great.

Thanks
Donna


Hi Donna

Iam pretty new to this aswell.. it would be a great help if you where to sharing the code and i can play around with the zoom etc..

thanks charlie
0 Kudos
DonnaBest
Deactivated User
I got this to work - needed to fix my syntax.    To use the ZoomToMapScale I needed to put:

md.ZoomToMapScale("8000", geom)

      (where md = my active map display and geom = the address geometry for the result row)

now when I search for my address it finds it, zooms to map scale 1:8000  and places a pushpin graphic on the map.

Thanks for all the help!!
Donna


Charlie -

I've written a little vb.net app to provide them the ability to search from the package layer file or gdb table file on their hard drive.   I'm new at all this so it may not be very well written - but I'll be happy to share this with you if would like.

But I can't seem to get it to zoom to  whatever layer or 'altitude' is equivalent to the Zoom To Street level from the Map ZoomTo dropdown.   Any ideas?
0 Kudos