cvalenzuela / Mappa

A canvas wrapper for Maps 🗺 🌍
https://mappa.js.org
359 stars 104 forks source link

Fix issue with scriptTag definition #23

Closed sirrah23 closed 3 years ago

sirrah23 commented 5 years ago

Fix #22

codecov-io commented 5 years ago

Codecov Report

Merging #23 into master will increase coverage by 0.22%. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #23      +/-   ##
==========================================
+ Coverage   44.52%   44.75%   +0.22%     
==========================================
  Files          14       14              
  Lines         393      391       -2     
==========================================
  Hits          175      175              
+ Misses        218      216       -2
Impacted Files Coverage Δ
src/providers/tile/Leaflet.js 2% <0%> (+0.03%) :arrow_up:
src/providers/tile/Mapbox.js 6.25% <0%> (+0.36%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2ea199a...69a2895. Read the comment docs.

sirrah23 commented 5 years ago

I just realized that the by removing that if-statement in the Leaflet construct loadSrc would run twice in the MapBox constructor.

I made a tweak so that loadSrc only ever runs in Leaflet and any class that inherits from it would let Leaflet handle the call to that function.