Skip to content

Instantly share code, notes, and snippets.

@kcarrier
Created August 13, 2014 20:17
Show Gist options
  • Save kcarrier/ca3188e2d67cfc720143 to your computer and use it in GitHub Desktop.
Save kcarrier/ca3188e2d67cfc720143 to your computer and use it in GitHub Desktop.
define([
'esri/dijit/Basemap',
'esri/dijit/BasemapLayer',
'esri/layers/osm'
], function (Basemap, BasemapLayer, osm) {
return {
map: true,
//must be either 'agol' or 'custom'
mode: 'custom',
title: 'Basemaps',
// must match one of the basemap keys below
mapStartBasemap: 'satellite',
//basemaps to show in menu. define in basemaps object below and reference by name here
// TODO Is this array necessary when the same keys are explicitly included/excluded below?
basemapsToShow: ['streets', 'satellite', 'hybrid', 'topo', 'lightGray', 'gray', 'national-geographic', 'osm', 'oceans'],
// define all valid custom basemaps here. Object of Basemap objects. For custom basemaps, the key name and basemap id must match.
basemaps: {
// agol basemaps
/*streets: {
title: 'Streets'
},
satellite: {
title: 'Satellite'
},
hybrid: {
title: 'Hybrid'
},
topo: {
title: 'Topo'
},
gray: {
title: 'Gray'
},
oceans: {
title: 'Oceans'
},
'national-geographic': {
title: 'Nat Geo'
},
osm: {
title: 'Open Street Map'
}*/
// examples of custom basemaps
streets: {
title: 'Clermont County Streets',
basemap: new Basemap({
id: 'streets',
layers: [new BasemapLayer({
url: 'http://maps.clermontauditor.org/arcgis/rest/services/WMAS/LODS/MapServer'
}), new BasemapLayer({
url: 'http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer'
}), new BasemapLayer({
url: 'http://maps.clermontauditor.org/arcgis/rest/services/WMAS/Streetmap/MapServer'
})]
})
},
satellite: {
title: '2014 Aerials',
basemap: new Basemap({
id: 'satellite',
layers: [new BasemapLayer({
url: 'http://maps.clermontauditor.org/arcgis/rest/services/WMAS/LODS/MapServer'
}), new BasemapLayer({
url: 'http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer'
}), new BasemapLayer({
url: 'http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer'
}), new BasemapLayer({
url: 'http://maps1.clermontauditor.org/arcgis/rest/services/WMAS/2014Ortho_WMAS/MapServer'
}), new BasemapLayer({
url: 'http://maps2.clermontauditor.org/arcgis/rest/services/WMAS/Hybrid/MapServer'
})]
})
},
hybrid: {
title: '2012 Aerial',
basemap: new Basemap({
id: 'hybrid',
layers: [new BasemapLayer({
url: 'http://maps.clermontauditor.org/arcgis/rest/services/WMAS/LODS/MapServer'
}), new BasemapLayer({
url: 'http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer',
}), new BasemapLayer({
url: 'http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer',
}), new BasemapLayer({
url: 'http://maps1.clermontauditor.org/arcgis/rest/services/WMAS/2012Ortho_WMAS/MapServer'
}), new BasemapLayer({
url: 'http://maps2.clermontauditor.org/arcgis/rest/services/WMAS/Hybrid/MapServer'
})]
})
},
lightGray: {
title: '1972 Aerial',
basemap: new Basemap({
id: 'lightGray',
layers: [new BasemapLayer({
url: 'http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer'
}), new BasemapLayer({
url: 'http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer',
isReference: true
}), new BasemapLayer({
url: 'http://maps1.clermontauditor.org/arcgis/rest/services/WMAS/1972Ortho_WMAS/MapServer'
}), new BasemapLayer({
url: 'http://maps2.clermontauditor.org/arcgis/rest/services/WMAS/Hybrid/MapServer'
})]
})
}
}
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment