Emergency Response Data without the Web:

A MapObjects Solution

Ann Moser

Pima County Flood Control District and Pima County DOT Technical Services Division are developing an emergency response application to provide fast access to Pima County emergency data and their related spatial features through an interactive map. The program uses MapObjects and Visual Basic to create a “stand alone” CD that can be loaded on a PC or laptop and accessed without Internet connectivity. This paper explains the development, as well as the functionality of this program. The presentation will demonstrate how MapObjects can be used to distribute spatial data for organizations that wish to access data on the field.


A Few More Details . . .

Standard map navigation tools are incorporated. The user has additional navigation abilities through “Metro View” and “Previous View” buttons as well as the ability to find and zoom to the emergency site by address or street intersections. Attribute data can be quickly accessed from the map by selecting the data button and clicking on any spot on the map. The map and the data boxes can be quickly printed out.


Running the Program

Initial View

Upon startup, the main map and index map zooms to the Tucson metro region. The index map shows the main map's boundaries in the metro region. The red shaded circle always appears in the center of the main map. It has a one mile radius (two miles diameter) and provides an instant visual measure of distance. The radius can be resized from within the Show/Hide command.


Layers



Functionality


Zoom In Button - Zooms in to half the height and width, or allows click and drag to mark the new viewing boundary.


Zoom Out Button - Zooms out to double the height and width.


Pan Button - Drags the map to a new position.


Data Button - Opens a new window with data about the features in that spot. This information can be sent to the default printer.

Show Data

If the program finds a hazardous material site, a new button will display information about each chemical stored on the site.

Hazardous Chemicals

Metro Area View - Zooms to the Tucson metro region.


Full Extent - Zooms out to view all of Pima County.


Previous View - Returns to the prior view. As many as three prior views can be accessed. This feature is useful if you zoom in on a spot then realize it is not the area you wanted, since you can quickly return to the view before you zoomed in.


Show/Hide Layer - This feature lets you choose what will be displayed on the main map, allowing access to many layers without congestion. To hide a visible layer, click on the layer and then the Hide button. To view a hidden layer, click on the layer and then the Show button.

Show or Hide Layers

Also on this window is the Show All Street Labels option. By selecting this box, you will see all the street labels rather than just the main street labels as you zoom in. The visibility and label choices you select will remain until you change them or quit the program.

You can adjust the radius of the circular scale from this screen as well.


Print Map - Will immediately print the map on your screen to your default printer.


Find Intersection - This feature will locate any street intersection in the Pima County database.

Locate Intersection

You can either enter the entire street name or the beginning part of a street name. The street type (a two-space abbreviation without a period) is optional. You can start over with the Clear Information button.

Example: BROADWAY
BROADWAY BL
BROAD

If there is more than one match, then a drop down list appears. The display will zoom in and center on the intersection which will be marked with a small square and label so it can be easily located again.


Find Parcel - This feature will locate by address any parcel in the Pima County database.

Locate Parcel by Address

Entering data in the Direction box is optional. You can either enter the entire street name, or the beginning part of a street name. The street type (a two-space abbreviation without a period) is optional. You can also start over with the Clear Information button. The Show Data option displays a window containing the parcel owner's name and address.

If there is more than one match, then a drop down list appears. The display will zoom in and center on the parcel which appears shaded so that it can be easily located again.



Emergency Response Program Requirements


Development

We wanted a program that was independent of the Web and that could be used without requiring GIS software. We chose Visual Basic 6.0 to enable the program to be stand alone. It was possible to create an interactive Map with MapObjects 2.0. MapObjects is an Esri component that can be added to the Visual Basic environment as a control.

Once MapObjects is installed, you start a Visual Basic project and select Esri MapObjects from the list of controls. You then click on the newly added Map Tool control Map Tool and draw the map object directly on a form.

Draw Map

Now for the more challenging part connecting code to add functionality!

Adding Layers- This is done from an ini file so changing data is quick.

Dim thisDataConnection As New Mapobjects2.DataConnection
Dim thisGeodataset As MapObjects2.Geodataset
Dim thisLayer As New Mapobjects2.MapLayer

thisDataConnection.Database = “C:\datapath\shapefilename”
For i = 1 To numLayers
  Set thisGeoDataset = thisDataConnection.FindGeoDataset(strFromIniFile)
  Set thisLayer.GeoDataset = thisGeodataset
  Map.Layers.Add thisLayer
Next

Here are a few examples of some statements and steps to link the tools and buttons with the map object:

Zoom, Pan, Changing Views

To make map tools just draw a button and use the Click event. For example:

To zoom in add this code to the cmdZoomin_Click function:
  Map.MousePointer = moZoomIn

Or add this code to the pan button:
  Map.MousePointer = moPan

And to change a view for the Metro View, Full Extent, and Previous View functions:
  Set Map.Extent = newRectWithValuesSetSomewhereInPrevCode

Source Code Outline of the Show/Hide Function

The Steps to Create Find Parcel by Address and Find Intersection Functionality

Find Parcel or Address

Source Code Outline of the Data Tool Function


Acknowledgements





Author Information:
Ann Moser
GIS Analyst
Pima County Department of Transportation and Flood Control District
201 North Stone Ave, 5th Floor
Tucson, Arizona 85701-1207
amoser@dot.co.pima.az.us
http://www.dot.co.pima.az.us