Skip to content

Commit 9732ecb

Browse files
committed
Reduce the amount of LOC for OneMapSG after merging #295
1 parent 069bf6e commit 9732ecb

File tree

1 file changed

+12
-57
lines changed

1 file changed

+12
-57
lines changed

leaflet-providers.js

Lines changed: 12 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@
280280
TonerLabels: 'toner-labels',
281281
TonerLite: 'toner-lite',
282282
Watercolor: {
283-
url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
283+
url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
284284
options: {
285285
variant: 'watercolor',
286286
minZoom: 1,
@@ -302,7 +302,7 @@
302302
}
303303
},
304304
TopOSMRelief: {
305-
url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
305+
url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
306306
options: {
307307
variant: 'toposm-color-relief',
308308
ext: 'jpg',
@@ -510,7 +510,7 @@
510510
base: 'aerial',
511511
variant: 'hybrid.grey.day'
512512
}
513-
},
513+
},
514514
pedestrianDay: 'pedestrian.day',
515515
pedestrianNight: 'pedestrian.night',
516516
satelliteDay: {
@@ -780,67 +780,22 @@
780780
}
781781
},
782782
OneMapSG: {
783-
url: 'https://maps-{s}.onemap.sg/v3/Default/{z}/{x}/{y}.png',
783+
url: 'https://maps-{s}.onemap.sg/v3/{variant}/{z}/{x}/{y}.png',
784784
options: {
785+
variant: 'Default',
785786
minZoom: 11,
786787
maxZoom: 18,
787788
bounds: [[1.56073, 104.11475], [1.16, 103.502]],
788-
attribution:
789-
'<img src="https://docs.onemap.sg/maps/images/oneMap64-01.png" style="height:20px;width:20px;"/> New OneMap | Map data © contributors, <a href="http://SLA.gov.sg">Singapore Land Authority</a>'
789+
attribution: 'New OneMap | Map data &copy; contributors, <a href="http://SLA.gov.sg">Singapore Land Authority</a>'
790790
},
791791
variants: {
792-
Default: {
793-
url: 'https://maps-{s}.onemap.sg/v3/Default/{z}/{x}/{y}.png',
794-
options: {
795-
minZoom: 11,
796-
maxZoom: 18,
797-
bounds: [[1.56073, 104.11475], [1.16, 103.502]],
798-
attribution:
799-
'<img src="https://docs.onemap.sg/maps/images/oneMap64-01.png" style="height:20px;width:20px;"/> New OneMap | Map data © contributors, <a href="http://SLA.gov.sg">Singapore Land Authority</a>'
800-
}
801-
},
802-
Night: {
803-
url: 'https://maps-{s}.onemap.sg/v3/Night/{z}/{x}/{y}.png',
804-
options: {
805-
minZoom: 11,
806-
maxZoom: 18,
807-
bounds: [[1.56073, 104.11475], [1.16, 103.502]],
808-
attribution:
809-
'<img src="https://docs.onemap.sg/maps/images/oneMap64-01.png" style="height:20px;width:20px;"/> New OneMap | Map data © contributors, <a href="http://SLA.gov.sg">Singapore Land Authority</a>'
810-
}
811-
},
812-
Original: {
813-
url: 'https://maps-{s}.onemap.sg/v3/Original/{z}/{x}/{y}.png',
814-
options: {
815-
minZoom: 11,
816-
maxZoom: 18,
817-
bounds: [[1.56073, 104.11475], [1.16, 103.502]],
818-
attribution:
819-
'<img src="https://docs.onemap.sg/maps/images/oneMap64-01.png" style="height:20px;width:20px;"/> New OneMap | Map data © contributors, <a href="http://SLA.gov.sg">Singapore Land Authority</a>'
820-
}
821-
},
822-
Grey: {
823-
url: 'https://maps-{s}.onemap.sg/v3/Grey/{z}/{x}/{y}.png',
824-
options: {
825-
minZoom: 11,
826-
maxZoom: 18,
827-
bounds: [[1.56073, 104.11475], [1.16, 103.502]],
828-
attribution:
829-
'<img src="https://docs.onemap.sg/maps/images/oneMap64-01.png" style="height:20px;width:20px;"/> New OneMap | Map data © contributors, <a href="http://SLA.gov.sg">Singapore Land Authority</a>'
830-
}
831-
},
832-
LandLot: {
833-
url: 'https://maps-{s}.onemap.sg/v3/LandLot/{z}/{x}/{y}.png',
834-
options: {
835-
minZoom: 11,
836-
maxZoom: 18,
837-
bounds: [[1.56073, 104.11475], [1.16, 103.502]],
838-
attribution:
839-
'<img src="https://docs.onemap.sg/maps/images/oneMap64-01.png" style="height:20px;width:20px;"/> New OneMap | Map data © contributors, <a href="http://SLA.gov.sg">Singapore Land Authority</a>'
840-
}
841-
}
792+
Default: 'Default',
793+
Night: 'Night',
794+
Original: 'Original',
795+
Grey: 'Grey',
796+
LandLot: 'LandLot'
842797
}
843-
}
798+
}
844799
};
845800

846801
L.tileLayer.provider = function (provider, options) {

0 commit comments

Comments
 (0)