AnsweredAssumed Answered

Javascript Template without ArcGIS.com Map Services?

Question asked by cpyle on Nov 17, 2011
Latest reply on Jun 16, 2015 by adamcarto
Is it possible to use the ArcGIS.com javascript templates w/out ArcGIS.com hosted maps?

We're trying to edit a feature service that's on our intranet, and so it is not accessible via ArcGIS.com. I've seen how to add a map definition using JSON instead of just a mapID.
I've been able to load a map hosted on Arcgis.com via the JSON definitition, but when I try to point to our internal services, the map fails to initialize. When initializing, the layer objects under each map layer are all undefined.

So, using the Editor_Chrome template, this works to define the ConfigOptions.webmap:

        var webmap = {}; webmap.item = { "title": "Soil Survey Map of USA", "snippet": "Detailed description of data", "extent": [[-139.4916, 10.7191], [-52.392, 59.5199]] };
        webmap.itemData = { "operationalLayers": [{
        "url": "http://server.arcgisonline.com/ArcGIS/rest/services/Specialty/Soil_Survey_Map/MapServer",
        "visibility": true,
        "opacity": 0.75,
        "title": "Soil Survey Map",
        "itemId": "204d94c9b1374de9a21574c9efa31164"
        }],
        "baseMap": {
        "baseMapLayers": [{
        "opacity": 1,
        "visibility": true,
        "url": "http://services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer"
        }, {
        "isReference": true,
        "opacity": 1,
        "visibility": true,
        "url": "http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer"
        }],
        "title": "World_Terrain_Base"
        },      
        "version": "1.1"    };
  


But this does not:

        var webmap = {}; webmap.item = { 
        "title": "San Diego Special Events", 
        "snippet": "Special Events Locations", 
        "extent": [[6171671, 1760860], [6621931, 2102353]] };
 
        webmap.itemData = { "operationalLayers": [{
        "url": "http://vmgisprod3/ArcGIS/rest/services/SEPS_Edit/FeatureServer",
        "visibility": true,
        "opacity": 1,
        "title": "Special Events Map",
        "itemId": "204d94c9b1374de9a21574c9efa31164"
        }],
        "baseMap": {
        "baseMapLayers": [{
        "opacity": 1,
        "visibility": true,
        "url": "http://citymaps.sannet.gov/ArcGIS/rest/services/SanGIS_Basemap/MapServer"
        }, {
        "isReference": true,
        "opacity": 1,
        "visibility": true,
        "url": "http://citymaps.sannet.gov/ArcGIS/rest/services/SanGIS_Basemap/MapServer"
        }],
        "title": "San Diego Basemap"
        },
        "version": "1.1"
        };
 


Is there a definition of the JSON webmap syntax somewhere that might give me a clue?

Thanks,
-Chris

Outcomes