Hi
I have a situation where I want to add an Esri created demograhics layer to my map via jScript and I am not sure on how best to do this or which objects to use (Feature layer, ArcGISDynamicMapServiceLayer or an other).
I can get the "base layer" to load using the following code
var demographicsLayerURL = "https://demographics5.arcgis.com/arcgis/rest/services/USA_Demographics_and_Boundaries_2015/MapServer";
var demographicsLayer = new ArcGISDynamicMapServiceLayer(demographicsLayerURL);
mapresponse.addLayer(demographicsLayer);
This works to load the "base layer" but what I am trying to do is load it as a layer showing "Unemployment figures". When I look at the URL for the Unemployment figures it looks like this
"https://demographics5.arcgis.com/arcgis/rest/services/USA_Demographics_and_Boundaries_2015/MapServer?ts=[SOMEID]"
In effect I simply want to add the below layer to my map in jScript.
http://www.arcgis.com/home/item.html?id=3c7feb94f97c47929292698b3544f07e
Apologies if this is not clear.
Ta,
D
I now can't even access the basic rest api link for the demographic layers without the browser going to "spastic mode".
I have tried on different machines so it has to be a problem with the account. Will try another account.
Ta,
D
Attached what happens to my poor old browser when using the link -- no idea what is causing this little gem of a behaviour 😉
I have a paid for account.
If you go to this link: http://www.arcgis.com/home/item.html?id=3c7feb94f97c47929292698b3544f07e
In the top sign into your organizational account. Once signed in, click on the link below 2015 USA Unemployment Rate:
Which worked for me.
Nope browser just goes into an infinite loop when accessing this
http://demographics5.arcgis.com/arcgis/rest/services/USA_Demographics_and_Boundaries_2015/MapServer
Previously I could get to the above link but could not get to the one with the query string ts appended.
I can however access this link Layer: Light Gray Canvas Base (ID: 0)
Driving me round the bend this is now 😉
Might have to raise a support ticket as this is BS.
Ta,
D
I had the same issue, but once I signed into my developer account I was good to go.