Skip to content

Commit

Permalink
Merge pull request #13 from OpenHistoricalMap/355-raster-tiles-are-hi…
Browse files Browse the repository at this point in the history
…dden-behind-vector-tiles

355 raster tiles are hidden behind vector tiles
  • Loading branch information
erictheise authored Jul 7, 2024
2 parents 08d6dee + a7fc639 commit d933a07
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
12 changes: 7 additions & 5 deletions js/ide.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ class IDE {

// init leaflet
ide.map = new L.Map("map", {
attributionControl: true,
attributionControl: false,
minZoom: 0,
maxZoom: configs.maxMapZoom,
worldCopyJump: false
Expand All @@ -490,11 +490,13 @@ 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;
ide.map.setView(pos, settings.coords_zoom);
// .addLayer(tiles);
// ide.map.tile_layer = tiles;

// OHM: add vector layer
ide.map.createPane("ohm_vectortiles");
Expand Down
3 changes: 2 additions & 1 deletion js/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ $(document).ready(() => {
const tilesUrl = settings.tileServer;
const tilesAttrib = configs.tileServerAttribution;
const tiles = new L.TileLayer(tilesUrl, {attribution: tilesAttrib});
ide.map.setView([0, 0], 1).addLayer(tiles);
ide.map.setView([0, 0], 1);
// .addLayer(tiles);
const scaleControl = new L.Control.Scale({metric: true, imperial: false});
scaleControl.addTo(ide.map);
// wait spinner
Expand Down

0 comments on commit d933a07

Please sign in to comment.