Skip to content

mode night dont work when using vectore #308

@T0biii

Description

@T0biii

Expected Behavior

darkmode when using vectore with
"mode": "night",

Current Behavior

no darkmode on the left

Possible Solution

some where around here the order and mode atrribut go missing:

meshviewer/lib/map.ts

Lines 84 to 104 in 4745218

let layers = config.mapLayers.map(function (layer) {
return {
name: layer.name,
layer:
layer.type == "vector"
? L.maplibreGL({
style: layer.url,
attributionControl: { customAttribution: layer.config.attribution },
maxZoom: layer.config.maxZoom,
})
: L.tileLayer(
layer.url.replace(
"{format}",
document.createElement("canvas").toDataURL("image/webp").indexOf("data:image/webp") === 0
? "webp"
: "png",
),
layer.config,
),
};
});

Steps to Reproduce

  1. Use this branch: https://github.com/freifunkMUC/meshviewer/tree/test-vectore
  2. Run npm install
  3. Run npm run dev
  4. Open the Map and switch between versatiles light and versatiles dark on the map Layer

Context

Your Environment

  • Version used: ``
  • Browser Name and version: ``
  • Operating System and version (desktop or mobile): ``
  • Link to your project: ``

Screenshots

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions