Simple Map Viewer Application


The mechnics of hooking ArcObjects into an application in order to display map data is relatively simple. This sample shows a very simple application that allows you to add data to a map, and then pan and zoom around the map.

How to use:
  1. Open the appropriate project.
  2. Compile and run the code.
  3. Using the File menu options add data to the map. Note, the specialized add shapefile option.
  4. Pan and zoom the data using the commands.

No ArcGIS application required

Difficulty: Intermediate

Visual Basic Visual C++
File Description
frmMain.frm Implementation file for Simple Map Viewer.
frmMain.frx Binary file, containing icons, used by implementation file.
Default.cur Default cursor icon
Hand.cur Hand cursor
MoveHand.cur Grab hand cursor
MoveZoomIn.cur Moving zoom in cursor
MoveZoomOut.cur Moving zoom out cursor
Pan.bmp Pan hand bitmap
ZoomIn.bmp Zoom in bitmap
ZoomIn.cur Zoom in cursor
ZoomOut.bmp Zoom out bitmap
ZoomOut.cur Zoom out cursor
VBSimpleMapViewer.RES Resource file containing cursors
VBSimpleMapViewer.vbp VB Project File for sample.
VBSimpleMapViewer.exe Compiled project executable.

Key CoClasses: Map, CancelTracker, Point, GxDialog, GxFilterFeatureDatasetsAndFeatureClasses, FeatureLayer,
Key Interfaces: IMap, IActiveView, IEnvelope, ITrackCancel, IScreenDisplay, IDisplayTransformation, IPoint, IFeatureClass, IEnumGxObject, IGxDialog, IGxObject, IGxDataset, IGxDatabase, IEnumDataset, IFeatureLayer, IfeatureClassContainer