How to use the esri-leaflet.Util.setEsriAttribution function in esri-leaflet

To help you get started, we’ve selected a few esri-leaflet examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Esri / esri-leaflet-geocoder / src / Controls / Geosearch.js View on Github external
onAdd: function (map) {
    // include 'Powered by Esri' in map attribution
    EsriUtil.setEsriAttribution(map);

    this._map = map;
    this._wrapper = DomUtil.create('div', 'geocoder-control');
    this._input = DomUtil.create('input', 'geocoder-control-input leaflet-bar', this._wrapper);
    this._input.title = this.options.title;

    if (this.options.expanded) {
      DomUtil.addClass(this._wrapper, 'geocoder-control-expanded');
      this._input.placeholder = this.options.placeholder;
    }

    // create the main suggested results container element
    this._suggestions = DomUtil.create('div', 'geocoder-control-suggestions leaflet-bar', this._wrapper);

    // create a child contents container element for each provider inside of this._suggestions
    // to maintain the configured order of providers for suggested results
github Esri / esri-leaflet-vector / src / Basemap.js View on Github external
onAdd: function (map) {
    this._map = map;
    Util.setEsriAttribution(map);

    if (map.attributionControl) {
      if (this._basemap === 'OpenStreetMap') {
        map.attributionControl.setPrefix('<a title="A JS library for interactive maps" href="http://leafletjs.com">Leaflet</a>');
        map.attributionControl.addAttribution('<span class="esri-dynamic-attribution">© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, map layer by Esri</span>');
      } else {
        Util._getAttributionData('https://static.arcgis.com/attribution/World_Street_Map', map);
        map.attributionControl.addAttribution('<span class="esri-dynamic-attribution">USGS, NOAA</span>');
      }
    }

    if (this._ready) {
      this._asyncAdd();
    } else {
      this.once('ready', function () {
        this._asyncAdd();
github Esri / esri-leaflet-vector / src / Layer.js View on Github external
onAdd: function (map) {
    this._map = map;
    Util.setEsriAttribution(map);

    if (this._ready) {
      this._asyncAdd();
    } else {
      this.once('ready', function () {
        this._asyncAdd();
      }, this);
    }
  },