Skip to content

Commit

Permalink
remove _load and _parse functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Raruto committed Nov 18, 2022
1 parent c5e3331 commit bed500b
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/KMZLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,11 @@ export const KMZLayer = L.KMZLayer = L.FeatureGroup.extend({

load: function(kmzUrl) {
L.KMZLayer._jsPromise = _.lazyLoader(this._requiredJSModules(), L.KMZLayer._jsPromise)
.then(() => this._load(kmzUrl));
.then(() => _.loadFile(kmzUrl))
.then((data) => this.parse(data, { name: _.getFileName(kmzUrl), icons: {} }));
},

parse: function(data, props) {
this._parse(data, props);
},

_load: function(url) {
return _.loadFile(url).then((data) => this._parse(data, { name: _.getFileName(url), icons: {} }));
},

_parse: function(data, props) {
return _.isZipped(data) ? this._parseKMZ(data, props) : this._parseKML(data, props);
},

Expand Down

0 comments on commit bed500b

Please sign in to comment.