I'm developing an Android app using ArcGIS Android SDK 100.4.

I'm using a simple basemap and add feature services from ArcGIS Online to it.
This has been working perfectly for a few months.
Recently I had to add the same feature service urls 2 times with different symbols and this is when I started experiencing a strange behavior:

After I load the map, all layers show a LoadStatus of LOADED and isVisible() returns true. However, some of the layers are randomly not displaying on the map.
The randomness makes me think this is some race condition related to the loading order of the operational layers (= feature services), but I wasn't able to detect anything special about the layers that were not displaying.

My code for adding the layers is pretty simple:
final ArcGISMap map = new ArcGISMap(baseMapUrl); for (String featureServiceUrl : featureServiceUrls) { ServiceFeatureTable serviceFeatureTable = new ServiceFeatureTable(featureServiceUrl); FeatureLayer featureLayer = new FeatureLayer(serviceFeatureTable); map.getOperationalLayers().add(featureLayer); } mMapView.setMap(map);
* I have omitted from my code above a part which adds a SimpleRenderer for rendering the feature services.

I'm sure I'm doing something wrong, but I'm having trouble debugging and figuring out what causes some of the layers to randomly disappear, while their status is LOADED and visible. The behavior is also not consistent (different layers are not appearing on the map every time and sometimes they all appear).

  • Welcome to GIS SE! As a new user, please be sure to take the short tour to learn about this site's focused Q&A format. – Andy Jan 29 '19 at 3:13
  • Thank you @Andy ! I'm using stackoverflow for years - happy to post my first GIS q – BeFree Jan 29 '19 at 3:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.