From d1d0ca5949ea26cf13783d500a26359efc24e986 Mon Sep 17 00:00:00 2001 From: john gravois Date: Sun, 1 Mar 2015 13:01:32 -0800 Subject: [PATCH] set f=json automatically when proxied --- src/Layers/DynamicMapLayer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Layers/DynamicMapLayer.js b/src/Layers/DynamicMapLayer.js index 420741a4a..5506073a4 100644 --- a/src/Layers/DynamicMapLayer.js +++ b/src/Layers/DynamicMapLayer.js @@ -14,6 +14,9 @@ EsriLeaflet.Layers.DynamicMapLayer = EsriLeaflet.Layers.RasterLayer.extend({ options.url = EsriLeaflet.Util.cleanUrl(url); this._service = new EsriLeaflet.Services.MapService(options); this._service.on('authenticationrequired requeststart requestend requesterror requestsuccess', this._propagateEvent, this); + if (options.proxy){ + options.f = 'json'; + } L.Util.setOptions(this, options); },