dkwan-esrichina-hk-esridist

Couldn't show feature layer with custom spatial reference

Discussion created by dkwan-esrichina-hk-esridist on Aug 13, 2012
Dear Everyone,
            

ArcGISTiledMapServiceLayer pBaseMap = new ArcGISTiledMapServiceLayer(""+"http://xxx.xxx.x.x/ArcGIS/rest/services/baseMap/MapServer");
  mPoint = new ArcGISFeatureLayer(""+"http://xxx.xxx.x.x/ArcGIS/rest/services/point/FeatureServer/0", AO);
mMapView.addLayer(pBaseMap);
  mMapView.addLayer(mPoint);

          The base map and feature layer are using same custom spatial reference, when I run the app, the feature layer have a small chance to display sometimes, but it shows Log error message if the feature layer couldn't display and the app wouldn't crash.

           I also tried on iOS platform and those layers work perfectly, so I wounder if this is android SDK's problem or?

           The Log Messages are
08-14 10:45:32.347: E/ArcGIS(29812): ArcGISFeatureLayer.FeatureSetCallback.onError
08-14 10:45:32.347: E/ArcGIS(29812): java.lang.RuntimeException: Invalid SpatialReference.
08-14 10:45:32.347: E/ArcGIS(29812):  at com.esri.core.geometry.SpatialReference.nativeGetWKID(Native Method)
08-14 10:45:32.347: E/ArcGIS(29812):  at com.esri.core.geometry.SpatialReference.create(Unknown Source)
08-14 10:45:32.347: E/ArcGIS(29812):  at com.esri.core.geometry.SpatialReference.fromJson(Unknown Source)
08-14 10:45:32.347: E/ArcGIS(29812):  at com.esri.core.map.FeatureSet.fromJson(Unknown Source)
08-14 10:45:32.347: E/ArcGIS(29812):  at com.esri.core.map.FeatureSet.fromJson(Unknown Source)
08-14 10:45:32.347: E/ArcGIS(29812):  at com.esri.core.internal.tasks.a.a.c.b(Unknown Source)
08-14 10:45:32.347: E/ArcGIS(29812):  at com.esri.core.internal.tasks.a.a.c.a(Unknown Source)
08-14 10:45:32.347: E/ArcGIS(29812):  at com.esri.core.internal.tasks.a.call(Unknown Source)
08-14 10:45:32.347: E/ArcGIS(29812):  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
08-14 10:45:32.347: E/ArcGIS(29812):  at java.util.concurrent.FutureTask.run(FutureTask.java:137)
08-14 10:45:32.347: E/ArcGIS(29812):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
08-14 10:45:32.347: E/ArcGIS(29812):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
08-14 10:45:32.347: E/ArcGIS(29812):  at java.lang.Thread.run(Thread.java:856)
08-14 10:45:32.354: E/ArcGIS(29812): FeatureSetCallback.onError
08-14 10:45:32.354: E/ArcGIS(29812): java.lang.RuntimeException: Invalid SpatialReference.
08-14 10:45:32.354: E/ArcGIS(29812):  at com.esri.core.geometry.SpatialReference.nativeGetWKID(Native Method)
08-14 10:45:32.354: E/ArcGIS(29812):  at com.esri.core.geometry.SpatialReference.create(Unknown Source)
08-14 10:45:32.354: E/ArcGIS(29812):  at com.esri.core.geometry.SpatialReference.fromJson(Unknown Source)
08-14 10:45:32.354: E/ArcGIS(29812):  at com.esri.core.map.FeatureSet.fromJson(Unknown Source)
08-14 10:45:32.354: E/ArcGIS(29812):  at com.esri.core.map.FeatureSet.fromJson(Unknown Source)
08-14 10:45:32.354: E/ArcGIS(29812):  at com.esri.core.internal.tasks.a.a.c.b(Unknown Source)
08-14 10:45:32.354: E/ArcGIS(29812):  at com.esri.core.internal.tasks.a.a.c.a(Unknown Source)
08-14 10:45:32.354: E/ArcGIS(29812):  at com.esri.core.internal.tasks.a.call(Unknown Source)
08-14 10:45:32.354: E/ArcGIS(29812):  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
08-14 10:45:32.354: E/ArcGIS(29812):  at java.util.concurrent.FutureTask.run(FutureTask.java:137)
08-14 10:45:32.354: E/ArcGIS(29812):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
08-14 10:45:32.354: E/ArcGIS(29812):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
08-14 10:45:32.354: E/ArcGIS(29812):  at java.lang.Thread.run(Thread.java:856)
08-14 10:45:32.354: W/ArcGIS(29812): java.lang.RuntimeException: Invalid SpatialReference.
08-14 10:45:32.354: W/ArcGIS(29812):  at com.esri.core.geometry.SpatialReference.nativeGetWKID(Native Method)
08-14 10:45:32.354: W/ArcGIS(29812):  at com.esri.core.geometry.SpatialReference.create(Unknown Source)
08-14 10:45:32.354: W/ArcGIS(29812):  at com.esri.core.geometry.SpatialReference.fromJson(Unknown Source)
08-14 10:45:32.354: W/ArcGIS(29812):  at com.esri.core.map.FeatureSet.fromJson(Unknown Source)
08-14 10:45:32.354: W/ArcGIS(29812):  at com.esri.core.map.FeatureSet.fromJson(Unknown Source)
08-14 10:45:32.354: W/ArcGIS(29812):  at com.esri.core.internal.tasks.a.a.c.b(Unknown Source)
08-14 10:45:32.354: W/ArcGIS(29812):  at com.esri.core.internal.tasks.a.a.c.a(Unknown Source)
08-14 10:45:32.354: W/ArcGIS(29812):  at com.esri.core.internal.tasks.a.call(Unknown Source)
08-14 10:45:32.354: W/ArcGIS(29812):  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
08-14 10:45:32.354: W/ArcGIS(29812):  at java.util.concurrent.FutureTask.run(FutureTask.java:137)
08-14 10:45:32.354: W/ArcGIS(29812):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
08-14 10:45:32.354: W/ArcGIS(29812):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
08-14 10:45:32.354: W/ArcGIS(29812):  at java.lang.Thread.run(Thread.java:856)

Outcomes