Question: How did you create your .gpk? I assume you shared your GP result from Desktop.If so, on the Geoprocessing Package dialog, did you make sure that the Support ArcGIS Runtime option was checked?
ArcGISLocalDynamicMapServiceLayer serviceLayer = new ArcGISLocalDynamicMapServiceLayer("c:\\USCitiesStates.mpk"); serviceLayer.addLayerInitializeCompleteListener(new LayerInitializeCompleteListener() { @Override public void layerInitializeComplete(LayerInitializeCompleteEvent e) { SpatialReference spRef = ((ArcGISLocalDynamicMapServiceLayer)e.getSource()).getDefaultSpatialReference(); System.out.println(spRef) ; } }); serviceLayer.initializeAsync();
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.