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); } } } }
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.