UNPKG

npmap.js

Version:

A JavaScript web mapping library, built as a Leaflet plugin, for the National Park Service.

24 lines (19 loc) 498 B
/* global L */ 'use strict'; var util = require('../util/util'); var TiledLayer = L.TileLayer.extend({ options: { errorTileUrl: L.Util.emptyImageUrl }, initialize: function(options) { util.strict(options.url, 'string'); L.Util.setOptions(this, options); L.TileLayer.prototype.initialize.call(this, options.url, options); this.fire('ready'); this.readyFired = true; return this; } }); module.exports = function(options) { return new TiledLayer(options); };