Select to view content in your preferred language

Arcgis server Rest Service not load

451
1
04-14-2022 02:34 PM
Nadir_Hussain
Occasional Contributor

Dear all,

below is my rest service url.

https://domainname/server/rest/services/servicename/MapServer.when i want to load in my android application.below is my code.

mapImageLayer = new ArcGISMapImageLayer("https://domainname/server/rest/services/servicename/MapServer");
map.getOperationalLayers().add(mapImageLayer);
mMapView.setViewpoint(new Viewpoint(23.056295, 46.195800, 29000000));
GraphicsOverlay graphicsOverlay = addGraphicsOverlay(mMapView);
mMapView.setMap(map);
// Add a listener that is invoked when layer loading has completed.
mapImageLayer.addDoneLoadingListener(() -> {
if (mapImageLayer.getLoadStatus() == LoadStatus.LOADED) {
ArcGISMapServiceInfo mapServiceInfo = mapImageLayer.getMapServiceInfo();
}
else if(mapImageLayer.getLoadStatus()==LoadStatus.FAILED_TO_LOAD)
{
Toast.makeText(getApplicationContext(), LoadStatus.FAILED_TO_LOAD.toString(), Toast.LENGTH_LONG).show();
}
but always load status failed execute.

But when i change URL from this service http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapSe....
map visible on mobile.it shows that some problem in my rest service.when i troubleshoot i check that "Mobile Data Access" in capabilies is missing in my
arcgis server missing.My arcgis server is 10.7.my arcinfo is 10.7.for this i am adding image Mobile.png
so please help me.why arcmap or arcgis server missing this option.

Please help.


Thanks
that there is one option ""

 

0 Kudos
1 Reply
RamaChintapalli
Esri Contributor

Hi,
Can you print your load error for the layer and see the exception and its cause/message ? 

mapImageLayer.getLoadError() 


Thanks
Rama

 

0 Kudos