Select to view content in your preferred language

Customizing the ArcGIS.com template projects (mainly the Basic Viewer template)

959
2
08-08-2012 12:30 PM
HubertLo
Emerging Contributor
The template projects from ArcGIS.com WebMap have been very helpful to get my own projects going. However I have some questions about how I can modify certain "features" on them from within the files downloaded.

1. Where are the Layers URLs stored? Which file is it? I have searched the index.html and layout.html, but nothing turns up.

2. In the Basic Viewer template, where are the JavaScript codes that create/populate the Layers menu dropdown? I am thinking of adding my own custom (graphics) layers to the same drop down.

3. If my clients have their own ArcGIS server and want the application to feed off their servers for layers/basemaps; how can I change them from within the html/JavaScript codes?
0 Kudos
2 Replies
KellyHutchins
Esri Notable Contributor
1 and 3. The layers are defined in the web map. The web map is created using the ArcGIS.com map viewer. So if you want to modify the layers you'll need to modify the web map or create a new one and modify the web map id used by the application.
2. Look in layout.js at the 'addLayerList' function.
0 Kudos
HubertLo
Emerging Contributor
1 and 3. The layers are defined in the web map. The web map is created using the ArcGIS.com map viewer. So if you want to modify the layers you'll need to modify the web map or create a new one and modify the web map id used by the application.


Thank you Kelly. I shall walk into the JavaScript code and see what I can do from there. I think if I can create the layerobject myself, I can probably add my own layers in. Lots of work but worth investigating.

As for ArcGIS.com map view. What if I have an ArcGIS Server in my company's Intranet hence nobody outside my company's network, can I still use these map service using ArcGIS.com map viewer?
0 Kudos