diff --git a/spec/Layers/FeatureLayer/FeatureManagerSpec.js b/spec/Layers/FeatureLayer/FeatureManagerSpec.js index e6e1783e6..652845fea 100644 --- a/spec/Layers/FeatureLayer/FeatureManagerSpec.js +++ b/spec/Layers/FeatureLayer/FeatureManagerSpec.js @@ -1263,7 +1263,8 @@ describe('L.esri.FeatureManager', function () { 'http://gis.example.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0/query?returnGeometry=true&where=1%3D1&outSR=4326&outFields=*&inSR=4326&geometry=%7B%22xmin%22%3A-122.6513671875%2C%22ymin%22%3A45.49094569262732%2C%22xmax%22%3A-122.607421875%2C%22ymax%22%3A45.521743896993634%2C%22spatialReference%22%3A%7B%22wkid%22%3A4326%7D%7D&geometryType=esriGeometryEnvelope&spatialRel=esriSpatialRelIntersects&geometryPrecision=6&resultOffset=0&resultType=tile&f=geojson', JSON.stringify({ type: 'FeatureCollection', - features: [feature7] }) + features: [feature7] + }) ); var layer = new MockLayer({ diff --git a/spec/Services/ServiceSpec.js b/spec/Services/ServiceSpec.js index 3611fe2f7..2a392bf78 100644 --- a/spec/Services/ServiceSpec.js +++ b/spec/Services/ServiceSpec.js @@ -84,8 +84,9 @@ describe('L.esri.Service', function () { }); it('should fire a requestend event', function (done) { - server.respondWith('GET', 'http://services.arcgis.com/mock/arcgis/rest/services/MockService/route?foo=bar&f=json', JSON.stringify({ foo: 'bar' - })); + server.respondWith('GET', 'http://services.arcgis.com/mock/arcgis/rest/services/MockService/route?foo=bar&f=json', + JSON.stringify({ foo: 'bar' } + )); service.on('requestend', function (e) { expect(e.type).to.equal('requestend'); diff --git a/src/Layers/DynamicMapLayer.js b/src/Layers/DynamicMapLayer.js index 96efca2e8..09680494a 100644 --- a/src/Layers/DynamicMapLayer.js +++ b/src/Layers/DynamicMapLayer.js @@ -112,7 +112,11 @@ export var DynamicMapLayer = RasterLayer.extend({ } } - identifyRequest.run(callback); + identifyRequest.run(callback, { + options: { + withCredentials: !!this.options.withCredentials + } + }); // set the flags to show the popup this._shouldRenderPopup = true; diff --git a/src/Layers/FeatureLayer/FeatureManager.js b/src/Layers/FeatureLayer/FeatureManager.js index f210ad7e6..8744befed 100644 --- a/src/Layers/FeatureLayer/FeatureManager.js +++ b/src/Layers/FeatureLayer/FeatureManager.js @@ -266,7 +266,7 @@ export var FeatureManager = FeatureGrid.extend({ query = query.offset(offset); } - query.params['resultType'] = 'tile'; + query.params.resultType = 'tile'; if (this.options.requestParams) { Util.extend(query.params, this.options.requestParams); diff --git a/src/Tasks/IdentifyFeatures.js b/src/Tasks/IdentifyFeatures.js index d50ccad57..4b6c4a6dc 100644 --- a/src/Tasks/IdentifyFeatures.js +++ b/src/Tasks/IdentifyFeatures.js @@ -1,6 +1,7 @@ import { latLng } from 'leaflet'; import { Identify } from './Identify'; -import { responseToFeatureCollection, +import { + responseToFeatureCollection, boundsToExtent, _setGeometry } from '../Util'; @@ -67,7 +68,7 @@ export var IdentifyFeatures = Identify.extend({ } callback.call(context, undefined, featureCollection, response); } - }); + }, context); }, _setGeometryParams: function (geometry) {