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();
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?
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.