summaryrefslogtreecommitdiff
path: root/node_modules/pigeon-maps/lib/providers.cjs.js
blob: 58e063fa2e327bb859df853e4e18c34f2c8330d9 (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
46
47
48
49
50
51
52
53
'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

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";
  };
};

exports.maptiler = maptiler;
exports.osm = osm;
exports.stadiamaps = stadiamaps;
exports.stamenTerrain = stamenTerrain;
exports.stamenToner = stamenToner;