Skip to content

Instantly share code, notes, and snippets.

@dbouwman
Created February 24, 2013 22:36
Show Gist options
  • Save dbouwman/5026034 to your computer and use it in GitHub Desktop.
Save dbouwman/5026034 to your computer and use it in GitHub Desktop.
Adding the mapConfig section to the options for our app
var options = {
menuItems: [
{ name: 'Current Fires', eventToRaise: 'View:CurrenFires' },
{ name: 'Historic Fires', eventToRaise: 'View:HistoricFires' },
{ name: 'Fire Danger Map', eventToRaise: 'View:FireDanger' }
],
toolItems: [
{name: 'Search', eventToRaise: 'View:Search', iconclass: 'entypo-search'},
{name: 'Stats', eventToRaise: 'View:Stats', iconclass: 'entypo-chart-bar'},
{name: 'Layer List', eventToRaise: 'View:LayerList', iconclass: 'entypo-map'},
],
mapConfig :{
initialExtent: { "xmin": -14106000, "ymin": 2834000, "xmax": -6896000, "ymax": 6385000, "spatialReference": { "wkid": 102100 } },
basemaps: [
{
'name': 'National Geographic',
'type': 'ArcGISTiledMapServiceLayer',
'visible': true,
'url': 'http://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer'
},
{
'name': 'Topo Map',
'type': 'ArcGISTiledMapServiceLayer',
'visible': false,
'url': 'http://server.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer'
},
{
'name': 'Satellite Imagery',
'type': 'ArcGISTiledMapServiceLayer',
'visible': false,
'url': 'http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer'
},
],
operationalLayers: [
{
name: 'Red Flag Warnings',
url: 'http://svinetfc3.fs.fed.us/ArcGIS_NPSG/rest/services/NPSG/Fire_Watches_Warnings/MapServer',
type: 'ArcGISDynamicMapServiceLayer',
visibleLayers: [1],
visible: true,
opacity: 0.8
},
{
name: 'Fire Perimeters',
url: 'http://wildfire.cr.usgs.gov/ArcGIS/rest/services/geomac_dyn/MapServer',
type: 'ArcGISFeatureServiceLayer',
visibleLayers: [1],
visible: true,
opacity: 0.8
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment