Skip to content

some BasemapLayers write 'null' to Leaflet's attribution control #647

@jgravois

Description

@jgravois

when adding a 'Labels' layer to the map (OceansLabels, GrayLabels, DarkGrayLabels), 'null' is added (as a string) to Leaflet's attributionControl. see the bottom righthand corner of the screenshot below for an example.

screenshot 2015-09-28 12 49 43

to reproduce this bug:

  1. fork/clone the repo
  2. open debug/sample.html and substitute the following basemapLayers
L.esri.basemapLayer('Oceans').addTo(map);
L.esri.basemapLayer('OceansLabels').addTo(map);
  1. open the sample application in a browser to confirm that the word 'null' is included.

this is happening because we currently pass an actual null to the L.esri.basemapLayer addAttribution() method here. bonus points if you're able to write a new test which checks for this kind of problem in the future.

with inspiration from the folks at @yourfirstpr and 'First Timers Only' by @kentcdodds, we are looking for a fix from someone that is just getting started with contributing to open source. if you're interested, but need help getting started, please don't be shy!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions