Skip to content

Commit

Permalink
added deprecation notice (warning) to BasemapLayer (Esri#1293)
Browse files Browse the repository at this point in the history
* added deprecation notice (warning) to BasemapLayer

* Update URL
  • Loading branch information
gavinr authored Sep 24, 2021
1 parent 7ed8c64 commit fe86d01
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Layers/BasemapLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ export var BasemapLayer = TileLayer.extend({

Util.setOptions(this, tileOptions);

// Deprecation notice:
if(!this.options.ignoreDeprecationWarning) {
console.warn('WARNING: L.esri.BasemapLayer uses data services that are in mature support and are not being updated. Please use L.esri.Vector.vectorBasemapLayer instead. More info: https://esriurl.com/esri-leaflet-basemap');
}

if (this.options.token && config.urlTemplate.indexOf('token=') === -1) {
config.urlTemplate += ('?token=' + this.options.token);
}
Expand Down

0 comments on commit fe86d01

Please sign in to comment.