18.04.2015 Views

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

WORKING WITH THE ARCGIS CONTROLS<br />

<strong>ArcGIS</strong> Desktop developers may already be<br />

familiar with MapControl and<br />

PageLayoutControl since these controls were<br />

initially made available in previous <strong>ArcGIS</strong><br />

Desktop releases. With the release of <strong>ArcGIS</strong><br />

<strong>Engine</strong>, these controls have been incorporated<br />

into its package of developer components. As in<br />

previous releases, <strong>ArcGIS</strong> Desktop developers<br />

can build applications with MapControl or<br />

PageLayoutControl even without an <strong>ArcGIS</strong><br />

<strong>Engine</strong> license. However, they cannot work with<br />

the additional controls provided with <strong>ArcGIS</strong><br />

<strong>Engine</strong> unless you have an <strong>Engine</strong> <strong>Developer</strong> Kit<br />

license.<br />

Deployment of applications built with either<br />

GlobeControl or SceneControl requires both<br />

a core <strong>ArcGIS</strong> license—<strong>Engine</strong> Runtime or<br />

Desktop—and its corresponding 3D extension<br />

license. For more information on deployment of<br />

<strong>ArcGIS</strong> controls-based applications, see<br />

Chapter 5, ‘Licensing and deployment’.<br />

the control programmatically using the LoadMxFile method.<br />

Not only can the MapControl and PageLayoutControl read map documents, they can<br />

also write map documents. Both controls implement the IMxdContents interface<br />

that enables the MapDocument object to write the contents of the MapControl and<br />

PageLayoutControl to a new map document.<br />

Helper methods, such as TrackRectangle, TrackPolygon, TrackLine, and TrackCircle,<br />

exist on the MapControl for tracking or “rubberbanding” shapes on the display.<br />

The VisibleRegion property can be used to change the shape of the MapControl’s<br />

display area. Helper methods, such as FindElementByName and LocateFrontElement,<br />

exist on the PageLayoutControl to help you manage elements, while the Printer and<br />

PrinterPageCount properties, together with the PrintPageLayout method, assist with<br />

printing tasks.<br />

GLOBECONTROL AND SCENECONTROL<br />

The GlobeControl and SceneControl correspond to the 3D views of the ArcGlobe<br />

and ArcScene applications. The GlobeControl encapsulates the GlobeViewer object,<br />

and the SceneControl encapsulates the SceneViewer object. Globe and Scene documents<br />

authored with the ArcGlobe and ArcScene applications can be loaded into<br />

the GlobeControl and SceneControl, respectively, to avoid programmatically composing<br />

the cartography.<br />

Both the GlobeControl and SceneControl have built-in navigation capability that<br />

allows the end user to move around the 3D view and visualize the 3D data,<br />

without having to use the available control commands or a custom command. To<br />

use the built-in navigation, the Navigate property must be set either through the<br />

property pages or programmatically. The end user can use the left mouse button<br />

to navigate backward and forward<br />

and to the left and right of<br />

the display and use the right<br />

mouse button to zoom in and<br />

out on the display.<br />

Applications built using the GlobeControl<br />

and SceneControl, respectively<br />

Chapter 3 • Developing with <strong>ArcGIS</strong> controls • 45

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!