From 069bf6e77c0d2472f4760f5b5dcd6e38fd7cb6cb Mon Sep 17 00:00:00 2001 From: Kyros Koh Date: Sat, 25 Aug 2018 15:09:30 +0800 Subject: [PATCH] Added OneMap (Singapore) (#295) --- leaflet-providers.js | 64 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/leaflet-providers.js b/leaflet-providers.js index 0b9b38ef..ef2a4c5e 100644 --- a/leaflet-providers.js +++ b/leaflet-providers.js @@ -778,7 +778,69 @@ } } } - } + }, + OneMapSG: { + url: 'https://maps-{s}.onemap.sg/v3/Default/{z}/{x}/{y}.png', + options: { + minZoom: 11, + maxZoom: 18, + bounds: [[1.56073, 104.11475], [1.16, 103.502]], + attribution: + ' New OneMap | Map data © contributors, Singapore Land Authority' + }, + variants: { + Default: { + url: 'https://maps-{s}.onemap.sg/v3/Default/{z}/{x}/{y}.png', + options: { + minZoom: 11, + maxZoom: 18, + bounds: [[1.56073, 104.11475], [1.16, 103.502]], + attribution: + ' New OneMap | Map data © contributors, Singapore Land Authority' + } + }, + Night: { + url: 'https://maps-{s}.onemap.sg/v3/Night/{z}/{x}/{y}.png', + options: { + minZoom: 11, + maxZoom: 18, + bounds: [[1.56073, 104.11475], [1.16, 103.502]], + attribution: + ' New OneMap | Map data © contributors, Singapore Land Authority' + } + }, + Original: { + url: 'https://maps-{s}.onemap.sg/v3/Original/{z}/{x}/{y}.png', + options: { + minZoom: 11, + maxZoom: 18, + bounds: [[1.56073, 104.11475], [1.16, 103.502]], + attribution: + ' New OneMap | Map data © contributors, Singapore Land Authority' + } + }, + Grey: { + url: 'https://maps-{s}.onemap.sg/v3/Grey/{z}/{x}/{y}.png', + options: { + minZoom: 11, + maxZoom: 18, + bounds: [[1.56073, 104.11475], [1.16, 103.502]], + attribution: + ' New OneMap | Map data © contributors, Singapore Land Authority' + } + }, + LandLot: { + url: 'https://maps-{s}.onemap.sg/v3/LandLot/{z}/{x}/{y}.png', + options: { + minZoom: 11, + maxZoom: 18, + bounds: [[1.56073, 104.11475], [1.16, 103.502]], + attribution: + ' New OneMap | Map data © contributors, Singapore Land Authority' + } + } + } + } }; L.tileLayer.provider = function (provider, options) {