The ArcGISTiledMapServiceLayer cannot be initialized

12-28-2016 06:55 AM
New Contributor

Hello, in our app, we're using

All of our maps are created via xml:

    mapoptions.ZoomLevel="13""51.033387, 10.322343" />
and then we create an ArcGISTiledMapServiceLayer
mMap.addLayer(new ArcGISTiledMapServiceLayer(""));

This sometimes leads to a black map, which cannot be used.
Completely killing the app mostly helps.

The error we get is as follows:

However i have no clue, WHY the layer cannot be initialized.
Also I would be interested in how to properly deal with this Error, since we logged
several thousand of this Error by now across various users and devices.

The screenshots whows an example. Sometimes the FloatingActionButton, which is anchored to the map, is in the upper left corner, as if the map had no size at all

Best Regards, bastischo

0 Kudos
2 Replies
Regular Contributor II

Right. Yes, with 10.2.8-1 there isn't an easy answer. What you could do is check the validity of the URL and then decide what other known service to add instead.

At version 100, this becomes a bit easier to handle, as you can loadAsync the service layer, verify that it loads successfully in the doneLoading listener, then from there, decide if it should be added to the map or not.

Does this help at all?

0 Kudos
New Contributor

It helps with understanding when and why this happens.

But ideally a workaround or fix would be the best solution.

Thank you very much.

0 Kudos