public class Gallery : ESRI.ArcGISExplorer.Application.Gallery { public Gallery() { // Add some items to the gallery. this.Items.Add(new GalleryItem("package layer", null)); } public override void OnClick(GalleryItem item) { // Work out which item was clicked. if (item.Caption.StartsWith("package")) { PackageLayer pkLayer = new PackageLayer("path to package layer"); if (pkLayer.Connect()) { //Add the PackageLayer to the Map ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.Map.ChildItems.Add(pkLayer); ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.ZoomTo(pkLayer); } } } }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.