sergei_r

com.esri.core.io.EsriServiceException: Not Found when trying to show objects layer

Discussion created by sergei_r on Jul 20, 2012
Latest reply on Jun 13, 2015 by salihyalcin89
Hi,

I'm using ArcGIS to add two dynamic layer (one for the world map and yet another for Moscow, Russia). Then I have a dynamic layer with objects (like restaurants and such) for Moscow which I also add:
 
     
       _baseWorldLayer = new ArcGISTiledMapServiceLayer( "http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer");
      _baseMoscowLayer = new ArcGISTiledMapServiceLayer( "http://atlas.mos.ru/ArcGIS/rest/services/EA/EA_Basemap/MapServer");
      _objectsLayer = new ArcGISDynamicMapServiceLayer("http://atlas.mos.ru/ArcGIS/rest/services/EA/Objects_map/MapServer");

       _mapView.addLayer(_baseWorldLayer);
       _mapView.addLayer(_baseMoscowLayer);
       _mapView.addLayer(_objectsLayer);


I then zoom to moscow:

public static final Location MOSCOW_LOCATION = new Location(55.752962D, 37.623196D);

 _mapView.setOnStatusChangedListener(new OnStatusChangedListener() {
    @Override
    public void onStatusChanged(Object source, STATUS status) {
       if (OnStatusChangedListener.STATUS.INITIALIZED == status && source == _mapView) {
          // Show Moscow region on start                  
          // TODO: what is scale parameter?
          _mapView.zoomToScale(new Point(Constants.MOSCOW_LOCATION.longitude(),
                Constants.MOSCOW_LOCATION.latitude()),
                0.2f);
       }
    }
});


Now scrolling through the map I see a lot of:

  
E/ArcGIS  (12117): ImageCallback.onError
E/ArcGIS  (12117): com.esri.core.io.EsriServiceException: Not Found
E/ArcGIS  (12117):  at com.esri.core.internal.b.a.b.a(Unknown Source)
E/ArcGIS  (12117):  at com.esri.core.internal.b.a.a.a(Unknown Source)
E/ArcGIS  (12117):  at com.esri.core.internal.a.a.g.b(Unknown Source)
E/ArcGIS  (12117):  at com.esri.android.map.ags.ArcGISDynamicMapServiceLayer.getImage(Unknown Source)
E/ArcGIS  (12117):  at com.esri.android.map.DynamicLayer$1.run(Unknown Source)
E/ArcGIS  (12117):  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
E/ArcGIS  (12117):  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
E/ArcGIS  (12117):  at java.util.concurrent.FutureTask.run(FutureTask.java:137)
E/ArcGIS  (12117):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
E/ArcGIS  (12117):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
E/ArcGIS  (12117):  at java.lang.Thread.run(Thread.java:1096)


and also no images in the objects layer are shown.

Why can this happen? Same exactly code for the iOS does the thing..

Outcomes