Skip to content

Commit

Permalink
Revert "a little housekeeping"
Browse files Browse the repository at this point in the history
This reverts commit 115ebf1.
  • Loading branch information
tmcgee committed Sep 8, 2015
1 parent 115ebf1 commit 4abc00d
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 43 deletions.
1 change: 0 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* global module */
module.exports = function(grunt) {

// middleware for grunt.connect
Expand Down
29 changes: 16 additions & 13 deletions viewer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@
</div>
</div>
</div>
<script type="text/javascript">
var dojoConfig = {
async: true,
packages: [{
name: 'viewer',
location: location.pathname.replace(/[^\/]+$/, '') + 'js/viewer'
},{
name: 'config',
location: location.pathname.replace(/[^\/]+$/, '') + 'js/config'
},{
name: 'gis',
location: location.pathname.replace(/[^\/]+$/, '') + 'js/gis'
}]
};
</script>
<!--[if lt IE 9]>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/es5-shim/4.0.3/es5-shim.min.js"></script>
<![endif]-->
Expand All @@ -47,19 +62,7 @@
file = 'config/' + file;
}
}
require({
async: true,
packages: [{
name: 'viewer',
location: location.pathname.replace(/[^\/]+$/, '') + 'js/viewer'
},{
name: 'config',
location: location.pathname.replace(/[^\/]+$/, '') + 'js/config'
},{
name: 'gis',
location: location.pathname.replace(/[^\/]+$/, '') + 'js/gis'
}]
}, ['viewer/Controller', file], function(Controller, config){
require(['viewer/Controller', file], function(Controller, config){
Controller.startup(config);
});
</script>
Expand Down
47 changes: 18 additions & 29 deletions viewer/js/config/viewer.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,20 @@
define([
'dojo/_base/lang',
'esri/units',
'esri/geometry/Extent',
'esri/config',
/*'esri/urlUtils',*/
'esri/tasks/GeometryService',
'esri/layers/ImageParameters'
], function (lang, units, Extent, esriConfig, /*urlUtils,*/ GeometryService, ImageParameters) {
'esri/units',
'esri/geometry/Extent',
'esri/config',
'esri/tasks/GeometryService',
'esri/layers/ImageParameters'
], function (units, Extent, esriConfig, GeometryService, ImageParameters) {

// esri config
esriConfig.defaults.geometryService = new GeometryService('https://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer');
// url to your proxy page, must be on same machine hosting you app. See proxy folder for readme.
esriConfig.defaults.io.proxyUrl = 'proxy/proxy.ashx';
esriConfig.defaults.io.alwaysUseProxy = false;
// esriConfig.defaults.io.corsDetection = false;
// urlUtils.addProxyRule({
// urlPrefix: 'geocode.arcgis.com',
// proxyUrl: 'proxy/proxy.ashx'
// });
// url to your geometry server.
esriConfig.defaults.geometryService = new GeometryService('http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer');

// additional functions, defines, etc you may need in config go here
function ipMix(params) {
return lang.mixin(new ImageParameters(), params);
}

var imageParams = ipMix({
format: 'png32'
});
//image parameters for dynamic services, set to png32 for higher quality exports.
var imageParameters = new ImageParameters();
imageParameters.format = 'png32';

return {
// used for debugging your app
Expand Down Expand Up @@ -91,7 +80,7 @@ define([
title: 'My layer'
}
}
}, {
}, {
type: 'feature',
url: 'http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/0',
title: 'San Francisco 311 Incidents',
Expand All @@ -102,15 +91,15 @@ define([
outFields: ['req_type', 'req_date', 'req_time', 'address', 'district'],
mode: 0
}
}, {
}, {
type: 'dynamic',
url: 'http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/PublicSafety/PublicSafetyOperationalLayers/MapServer',
title: 'Louisville Public Safety',
options: {
id: 'louisvillePubSafety',
opacity: 1.0,
visible: true,
imageParameters: imageParams
imageParameters: imageParameters
},
identifyLayerInfos: {
layerIds: [2, 4, 5, 8, 12, 21]
Expand All @@ -120,15 +109,15 @@ define([
hideLayers: [21]
}
}
}, {
}, {
type: 'dynamic',
url: 'http://sampleserver6.arcgisonline.com/arcgis/rest/services/DamageAssessment/MapServer',
title: 'Damage Assessment',
options: {
id: 'DamageAssessment',
opacity: 1.0,
visible: true,
imageParameters: imageParams
imageParameters: imageParameters
},
legendLayerInfos: {
exclude: true
Expand All @@ -138,7 +127,7 @@ define([
metadataUrl: true,
expanded: true
}
}],
}],
// set include:true to load. For titlePane type set position the the desired order in the sidebar
widgets: {
growler: {
Expand Down

0 comments on commit 4abc00d

Please sign in to comment.