-
-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #104 from tmcgee/master
New widgetLoader and 'config' directory.
- Loading branch information
Showing
11 changed files
with
265 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
define([ | ||
'esri/dijit/Basemap', | ||
'esri/dijit/BasemapLayer', | ||
'esri/layers/osm' | ||
], function (Basemap, BasemapLayer, osm) { | ||
return { | ||
map: true, | ||
//must be either 'agol' or 'custom' | ||
mode: 'agol', | ||
title: 'Basemaps', | ||
// must match one of the basemap keys below | ||
mapStartBasemap: 'streets', | ||
//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: 'Streets', | ||
basemap: new Basemap({ | ||
id: 'streets', | ||
layers: [new BasemapLayer({ | ||
url: 'http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer' | ||
})] | ||
}) | ||
}, | ||
satellite: { | ||
title: 'Satellite', | ||
basemap: new Basemap({ | ||
id: 'satellite', | ||
layers: [new BasemapLayer({ | ||
url: 'http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer' | ||
})] | ||
}) | ||
}, | ||
hybrid: { | ||
title: 'Hybrid', | ||
basemap: new Basemap({ | ||
id: 'hybrid', | ||
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, | ||
displayLevels: [0, 1, 2, 3, 4, 5, 6, 7] | ||
}), new BasemapLayer({ | ||
url: 'http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Transportation/MapServer', | ||
isReference: true, | ||
displayLevels: [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] | ||
})] | ||
}) | ||
}, | ||
lightGray: { | ||
title: 'Light Gray Canvas', | ||
basemap: new Basemap({ | ||
id: 'lightGray', | ||
layers: [new BasemapLayer({ | ||
url: 'http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer' | ||
}), new BasemapLayer({ | ||
url: 'http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer', | ||
isReference: true | ||
})] | ||
}) | ||
} | ||
*/ | ||
} | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
define({ | ||
map: true, | ||
editable: true, | ||
bookmarks: [ | ||
{ | ||
extent: { | ||
xmin: -15489130.48708616, | ||
ymin: 398794.4860580916, | ||
xmax: -5891085.7193757, | ||
ymax: 8509680.431452557, | ||
spatialReference: { | ||
wkid: 102100 | ||
} | ||
}, | ||
name: 'USA' | ||
} | ||
] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
define({ | ||
map: true, | ||
queries: [ | ||
{ | ||
description: 'Find A Public Safety Location By Name', | ||
url: 'http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyOperationalLayers/MapServer', | ||
layerIds: [1,2,3,4,5,6,7], | ||
searchFields: ['FDNAME, PDNAME', 'NAME', 'RESNAME'], | ||
minChars: 2 | ||
}, | ||
{ | ||
description: 'Find Incident By Code/Description', | ||
url: 'http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyOperationalLayers/MapServer', | ||
layerIds: [15,17,18], | ||
searchFields: ['FCODE','DESCRIPTION'], | ||
minChars: 4 | ||
} | ||
] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
define({ | ||
map: true, | ||
mapClickMode: true, | ||
identifyTolerance: 5, | ||
|
||
// config object definition: | ||
// {<layer id>:{ | ||
// <sub layer number>:{ | ||
// <pop-up definition, see link below> | ||
// } | ||
// }, | ||
// <layer id>:{ | ||
// <sub layer number>:{ | ||
// <pop-up definition, see link below> | ||
// } | ||
// } | ||
// } | ||
|
||
// for details on pop-up definition see: https://developers.arcgis.com/javascript/jshelp/intro_popuptemplate.html | ||
|
||
identifies: { | ||
louisvillePubSafety: { | ||
2: { | ||
title: 'Police Station', | ||
fieldInfos: [{ | ||
fieldName: 'Name', | ||
visible: true | ||
}, { | ||
fieldName: 'Address', | ||
visible: true | ||
}, { | ||
fieldName: 'Type', | ||
visible: true | ||
}, { | ||
fieldName: 'Police Function', | ||
visible: true | ||
}, { | ||
fieldName: 'Last Update Date', | ||
visible: true | ||
}] | ||
}, | ||
8: { | ||
title: 'Traffic Camera', | ||
description: '{Description} lasted updated: {Last Update Date}', | ||
mediaInfos: [{ | ||
title: '', | ||
caption: '', | ||
type: 'image', | ||
value: { | ||
sourceURL: '{Location URL}', | ||
linkURL: '{Location URL}' | ||
} | ||
}] | ||
} | ||
} | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.