summaryrefslogtreecommitdiff
path: root/node_modules/pigeon-maps/lib/providers.esm.js
blob: de5299e0bdfd6c2c032b173465919f153dedd261 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
function osm(x, y, z) {
  return "https://tile.openstreetmap.org/" + z + "/" + x + "/" + y + ".png";
}
function stamenToner(x, y, z, dpr) {
  if (dpr === void 0) {
    dpr = 1;
  }

  return "https://stamen-tiles.a.ssl.fastly.net/toner/" + z + "/" + x + "/" + y + (dpr >= 2 ? '@2x' : '') + ".png";
}
function stamenTerrain(x, y, z, dpr) {
  if (dpr === void 0) {
    dpr = 1;
  }

  return "https://stamen-tiles.a.ssl.fastly.net/terrain/" + z + "/" + x + "/" + y + (dpr >= 2 ? '@2x' : '') + ".jpg";
}
var maptiler = function maptiler(apiKey, map) {
  if (map === void 0) {
    map = 'streets';
  }

  return function (x, y, z, dpr) {
    if (dpr === void 0) {
      dpr = 1;
    }

    return "https://api.maptiler.com/maps/" + map + "/256/" + z + "/" + x + "/" + y + (dpr >= 2 ? '@2x' : '') + ".png?key=" + apiKey;
  };
};
var stadiamaps = function stadiamaps(style) {
  if (style === void 0) {
    style = 'alidade_smooth';
  }

  return function (x, y, z, dpr) {
    if (dpr === void 0) {
      dpr = 1;
    }

    return "https://tiles.stadiamaps.com/styles/" + style + "/" + z + "/" + x + "/" + y + (dpr >= 2 ? '@2x' : '') + ".png";
  };
};

export { maptiler, osm, stadiamaps, stamenTerrain, stamenToner };