Skip to content

Offline in local-directory #3

Open
@LaermTot

Description

@LaermTot

Hello

I tried using your demo locally by modifying the source a bit

var idx = location.pathname.lastIndexOf("index.html");
var loc = location.origin+location.pathname;
if (idx > 0)
  loc = location.origin+location.pathname.substring(0,idx);

var style = {
  "version": 8,
  "sources": {
    "countries": {
      "type": "vector",
      "tiles": [loc+"/countries/{z}/{x}/{y}.pbf"],
      "maxzoom": 6
    }
  },
  "glyphs": loc+"font/{fontstack}/{range}.pbf",
  "layers": [{

the Problem was, that ocation.origin+location.pathname created a String like

file:///var/foo/bar/somewhere/index.html ..

The Problem that I'm having tight now, is the fact that I simply get a Page with all the Navigation-Widgets but no map is being displayd ..

Any hints what I'm doing wrong ?

.....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions