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();
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.