Skip to content

Commit

Permalink
Merge pull request #703 from OpenHistoricalMap/upstream-fix-for-attri…
Browse files Browse the repository at this point in the history
…bution-control

Proposed fix for #702/Correct instantiation of attribution control
  • Loading branch information
tyrasd authored Nov 3, 2024
2 parents d80cd01 + 44d8120 commit 5b42099
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions js/ide.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ class IDE {

// init leaflet
ide.map = new L.Map("map", {
attributionControl: true,
attributionControl: false,
minZoom: 0,
maxZoom: configs.maxMapZoom,
worldCopyJump: false
Expand All @@ -489,8 +489,9 @@ class IDE {
maxNativeZoom: 19,
maxZoom: ide.map.options.maxZoom
});
ide.attribControl = new L.Control.Attribution({prefix: false});
ide.attribControl.addAttribution(tilesAttrib);
const attribControl = new L.Control.Attribution({position: "bottomright"});
attribControl.addAttribution(tilesAttrib);
attribControl.addTo(ide.map);
const pos = new L.LatLng(settings.coords_lat, settings.coords_lon);
ide.map.setView(pos, settings.coords_zoom).addLayer(tiles);
ide.map.tile_layer = tiles;
Expand Down

0 comments on commit 5b42099

Please sign in to comment.