From ebf859e23c4334ee07d9f87954492c5ee4802315 Mon Sep 17 00:00:00 2001 From: john gravois Date: Wed, 17 Aug 2016 11:34:51 -0700 Subject: [PATCH] dont ask for layer metadata twice (#127) --- package.json | 4 ++-- src/FeatureLayerHook.js | 14 -------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index a5ea363..8baed57 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ "John Gravois " ], "dependencies": { - "esri-leaflet": "^2.0.0-beta.8", - "leaflet": "^1.0.0-beta.2", + "esri-leaflet": "^2.0.0", + "leaflet": "^1.0.0-rc.3", "leaflet-shape-markers": "^1.0.4" }, "devDependencies": { diff --git a/src/FeatureLayerHook.js b/src/FeatureLayerHook.js index 946f083..6354470 100644 --- a/src/FeatureLayerHook.js +++ b/src/FeatureLayerHook.js @@ -190,18 +190,4 @@ L.esri.FeatureLayer.addInitHook(function () { } rend.attachStylesToLayer(this); }; - - this.metadata(function (error, response) { - if (error) { - return; - } if (response && response.drawingInfo) { - // if drawingInfo from a webmap is supplied in the layer constructor, use that instead - if (this.options.drawingInfo) { - response.drawingInfo = this.options.drawingInfo; - } - this._setRenderers(response); - } if (this._alreadyAdded) { - this.setStyle(this._originalStyle); - } - }, this); });