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();
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.