From f809998308432b3c8401cd9b17e4d253ad6dbdbc Mon Sep 17 00:00:00 2001 From: Tim McGee Date: Mon, 23 Nov 2015 11:05:17 -0700 Subject: [PATCH 1/2] replace `indexOf` with dojo's array.indexOf for compatibility with IE8. --- viewer/js/gis/dijit/Identify.js | 6 +++--- viewer/js/gis/dijit/LayerControl/controls/_DynamicFolder.js | 2 +- .../js/gis/dijit/LayerControl/controls/_DynamicSublayer.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/viewer/js/gis/dijit/Identify.js b/viewer/js/gis/dijit/Identify.js index 9518799d3..0bd7793a9 100644 --- a/viewer/js/gis/dijit/Identify.js +++ b/viewer/js/gis/dijit/Identify.js @@ -65,7 +65,7 @@ define([ // Identify (Feature Service), create an // infoTemplate for the graphic features. Create // it only if one does not already exist. - if (layer.capabilities && layer.capabilities.toLowerCase().indexOf('data') < 0) { + if (layer.capabilities && array.indexOf(layer.capabilities.toLowerCase(), 'data') < 0) { if (!layer.infoTemplate) { var infoTemplate = this.getInfoTemplate(layer, layer.layerId); if (infoTemplate) { @@ -200,7 +200,7 @@ define([ // handle feature layers that come from a feature service // and may already have an info template var layer = evt.graphic._layer; - if (layer.infoTemplate || (layer.capabilities && layer.capabilities.toLowerCase().indexOf('data') < 0)) { + if (layer.infoTemplate || (layer.capabilities && array.indexOf(layer.capabilities.toLowerCase(), 'data') < 0)) { return false; } @@ -262,7 +262,7 @@ define([ } else if ((ref.declaredClass === 'esri.layers.FeatureLayer') && !isNaN(ref.layerId)) { // feature layer // do not allow feature layer that does not support // Identify (Feature Service) - if (ref.capabilities && ref.capabilities.toLowerCase().indexOf('data') > 0) { + if (ref.capabilities && array.indexOf(ref.capabilities.toLowerCase(), 'data') >= 0) { layerIds = [ref.layerId]; } } else if (ref.layerInfos) { diff --git a/viewer/js/gis/dijit/LayerControl/controls/_DynamicFolder.js b/viewer/js/gis/dijit/LayerControl/controls/_DynamicFolder.js index 8c949d037..a48e7115e 100644 --- a/viewer/js/gis/dijit/LayerControl/controls/_DynamicFolder.js +++ b/viewer/js/gis/dijit/LayerControl/controls/_DynamicFolder.js @@ -36,7 +36,7 @@ define([ postCreate: function () { this.inherited(arguments); // Should the control be visible or hidden? - if (this.control.controlOptions.layerIds && this.control.controlOptions.layerIds.indexOf(this.sublayerInfo.id) < 0) { + if (this.control.controlOptions.layerIds && array.indexOf(this.control.controlOptions.layerIds, this.sublayerInfo.id) < 0) { domClass.add(this.domNode, 'layerControlHidden'); } var checkNode = this.checkNode; diff --git a/viewer/js/gis/dijit/LayerControl/controls/_DynamicSublayer.js b/viewer/js/gis/dijit/LayerControl/controls/_DynamicSublayer.js index 2f545c073..e5749ee90 100644 --- a/viewer/js/gis/dijit/LayerControl/controls/_DynamicSublayer.js +++ b/viewer/js/gis/dijit/LayerControl/controls/_DynamicSublayer.js @@ -46,7 +46,7 @@ define([ postCreate: function () { this.inherited(arguments); // Should the control be visible or hidden? - if (this.control.controlOptions.layerIds && this.control.controlOptions.layerIds.indexOf(this.sublayerInfo.id) < 0) { + if (this.control.controlOptions.layerIds && array.indexOf(this.control.controlOptions.layerIds, this.sublayerInfo.id) < 0) { domClass.add(this.domNode, 'layerControlHidden'); } var checkNode = this.checkNode; From 557e67d9e61ee1da5fc6b3adc29fedee6d2679d3 Mon Sep 17 00:00:00 2001 From: Tim McGee Date: Mon, 23 Nov 2015 11:10:46 -0700 Subject: [PATCH 2/2] Google maps api no longer requires the `sensor` parameter. --- viewer/js/gis/dijit/StreetView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/viewer/js/gis/dijit/StreetView.js b/viewer/js/gis/dijit/StreetView.js index 5ba63ed57..dde884fdb 100644 --- a/viewer/js/gis/dijit/StreetView.js +++ b/viewer/js/gis/dijit/StreetView.js @@ -22,7 +22,7 @@ define([ 'dijit/form/Button', 'xstyle/css!./StreetView/css/StreetView.css', - 'gis/plugins/async!//maps.google.com/maps/api/js?v=3&sensor=false' + 'gis/plugins/async!//maps.google.com/maps/api/js?v=3' ], function (declare, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, lang, aspect, topic, GraphicsLayer, Graphic, SimpleRenderer, template, PictureMarkerSymbol, domStyle, Point, SpatialReference, MenuItem, proj4, i18n) { return declare([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], {