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();
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.