Select to view content in your preferred language

Issue with ArcGISDynamicMapServiceLayer Not Working on a Service

1841
1
07-29-2015 10:15 AM
AnthonyDaniels
Emerging Contributor

I am working on an 3.14 js api web app and the issue is that ArcGISDynamicMapServiceLayer is working on 2 of my services, but not on my third.  I look at the REST it shows up fine.  I have check the URL many times but when I try to add the layer to my map, it crashes.

m_allDistLayers = new esri.layers.ArcGISDynamicMapServiceLayer("http://newecho:6080/arcgis/rest/services/DAMP/dareas/MapServer");

m.map.addLayer(allDistLayers);

ReferenceError: m is not defined

    at loadLayers (http://localhost/DAMP/js/Default.js:171:2)

    at http://localhost/DAMP/js/Default.js:104:18

    at b.ready.b.addOnLoad.e (http://js.arcgis.com/3.14/init.js:235:451)

    at g (http://js.arcgis.com/3.14/init.js:235:179)

    at http://js.arcgis.com/3.14/init.js:9:412

    at a (http://js.arcgis.com/3.14/init.js:5:295)

    at r.signal (http://js.arcgis.com/3.14/init.js:9:382)

    at ia (http://js.arcgis.com/3.14/init.js:23:112)

    at fa (http://js.arcgis.com/3.14/init.js:23:144)

    at g (http://js.arcgis.com/3.14/init.js:25:375)

info: m is not defined

All other services are off the same ArcGIS Server 10.3.1 and are working without issue  Example:

m_census = new esri.layers.ArcGISDynamicMapServiceLayer("http://newecho:6080/arcgis/rest/services/DAMP/census/MapServer");

m_map.addLayer(m_census);

m_crime = new esri.layers.ArcGISDynamicMapServiceLayer("http://newecho:6080/arcgis/rest/services/DAMP/crime/MapServer");

m_map.addLayer(m_crime);

Thanks

Anthony

0 Kudos
1 Reply
AnthonyDaniels
Emerging Contributor

I found my error

0 Kudos