The Regions of France sample (under Map Applications → Regions of France) displays a map of France and the surrounding countries, and demonstrates how different layets can be made visible at different zoom levels. As you zoom in, the Regions layer will color France's provinces, then each province will be divided up as the Departments layer comes into view.
The source code snippets demonstrate assigning different layers to different zoom levels.
C#
// Set the zoom visibility ranges of the Regions Layer. mapControl1.Layers["Regions"].VisibleFromZoom = 200; mapControl1.Layers["Regions"].VisibleToZoom = 1000; mapControl1.Layers["Regions"].LabelVisibleFromZoom = 165; // Set the zoom visibility ranges of the Departements Layer. mapControl1.Layers["Departements"].VisibleFromZoom = 400; mapControl1.Layers["Departements"].VisibleToZoom = 1000; mapControl1.Layers["Departements"].LabelVisibleFromZoom = 165;
VisualBasic.NET
' Set the zoom visibility ranges of the Regions Layer. mapControl1.Layers("Regions").VisibleFromZoom = 200 mapControl1.Layers("Regions").VisibleToZoom = 1000 mapControl1.Layers("Regions").LabelVisibleFromZoom = 165 ' Set the zoom visibility ranges of the Departements Layer. mapControl1.Layers("Departements").VisibleFromZoom = 400 mapControl1.Layers("Departements").VisibleToZoom = 1000 mapControl1.Layers("Departements").LabelVisibleFromZoom = 165
For information on DUNDAS's products and services, please send e-mail to sales@dundas.com, phone us at 416-467-5100, 800-463-1492, or FAX your request to 416-422-4801.
Copyright © 2007 Dundas Data Visualization, Inc. and others. Please observe our terms of use.