Skip to content

Commit 1ece447

Browse files
committed
Sort cities by importance when displaying their labels
1 parent 6512bf7 commit 1ece447

File tree

1 file changed

+204
-1
lines changed

1 file changed

+204
-1
lines changed

style/style.json

Lines changed: 204 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3837,7 +3837,7 @@
38373837
}
38383838
},
38393839
{
3840-
"id": "place_city",
3840+
"id": "place_city_4",
38413841
"type": "symbol",
38423842
"metadata": {},
38433843
"source": "openmaptiles",
@@ -3849,6 +3849,209 @@
38493849
"==",
38503850
"class",
38513851
"city"
3852+
],
3853+
[
3854+
">=",
3855+
"rank",
3856+
4
3857+
]
3858+
],
3859+
"layout": {
3860+
"icon-image": {
3861+
"base": 1,
3862+
"stops": [
3863+
[
3864+
0,
3865+
"dot_9"
3866+
],
3867+
[
3868+
8,
3869+
""
3870+
]
3871+
]
3872+
},
3873+
"text-anchor": "bottom",
3874+
"text-field": "{name_en}",
3875+
"text-font": [
3876+
"Roboto Medium"
3877+
],
3878+
"text-max-width": 8,
3879+
"text-offset": [
3880+
0,
3881+
0
3882+
],
3883+
"text-size": {
3884+
"base": 1.2,
3885+
"stops": [
3886+
[
3887+
7,
3888+
14
3889+
],
3890+
[
3891+
11,
3892+
24
3893+
]
3894+
]
3895+
},
3896+
"icon-allow-overlap": true,
3897+
"icon-optional": false
3898+
},
3899+
"paint": {
3900+
"text-color": "#333",
3901+
"text-halo-color": "rgba(255,255,255,0.8)",
3902+
"text-halo-width": 1.2
3903+
}
3904+
},
3905+
{
3906+
"id": "place_city_3",
3907+
"type": "symbol",
3908+
"metadata": {},
3909+
"source": "openmaptiles",
3910+
"source-layer": "place",
3911+
"minzoom": 5,
3912+
"filter": [
3913+
"all",
3914+
[
3915+
"==",
3916+
"class",
3917+
"city"
3918+
],
3919+
[
3920+
"==",
3921+
"rank",
3922+
3
3923+
]
3924+
],
3925+
"layout": {
3926+
"icon-image": {
3927+
"base": 1,
3928+
"stops": [
3929+
[
3930+
0,
3931+
"dot_9"
3932+
],
3933+
[
3934+
8,
3935+
""
3936+
]
3937+
]
3938+
},
3939+
"text-anchor": "bottom",
3940+
"text-field": "{name_en}",
3941+
"text-font": [
3942+
"Roboto Medium"
3943+
],
3944+
"text-max-width": 8,
3945+
"text-offset": [
3946+
0,
3947+
0
3948+
],
3949+
"text-size": {
3950+
"base": 1.2,
3951+
"stops": [
3952+
[
3953+
7,
3954+
14
3955+
],
3956+
[
3957+
11,
3958+
24
3959+
]
3960+
]
3961+
},
3962+
"icon-allow-overlap": true,
3963+
"icon-optional": false
3964+
},
3965+
"paint": {
3966+
"text-color": "#333",
3967+
"text-halo-color": "rgba(255,255,255,0.8)",
3968+
"text-halo-width": 1.2
3969+
}
3970+
},
3971+
{
3972+
"id": "place_city_2",
3973+
"type": "symbol",
3974+
"metadata": {},
3975+
"source": "openmaptiles",
3976+
"source-layer": "place",
3977+
"minzoom": 5,
3978+
"filter": [
3979+
"all",
3980+
[
3981+
"==",
3982+
"class",
3983+
"city"
3984+
],
3985+
[
3986+
"==",
3987+
"rank",
3988+
2
3989+
]
3990+
],
3991+
"layout": {
3992+
"icon-image": {
3993+
"base": 1,
3994+
"stops": [
3995+
[
3996+
0,
3997+
"dot_9"
3998+
],
3999+
[
4000+
8,
4001+
""
4002+
]
4003+
]
4004+
},
4005+
"text-anchor": "bottom",
4006+
"text-field": "{name_en}",
4007+
"text-font": [
4008+
"Roboto Medium"
4009+
],
4010+
"text-max-width": 8,
4011+
"text-offset": [
4012+
0,
4013+
0
4014+
],
4015+
"text-size": {
4016+
"base": 1.2,
4017+
"stops": [
4018+
[
4019+
7,
4020+
14
4021+
],
4022+
[
4023+
11,
4024+
24
4025+
]
4026+
]
4027+
},
4028+
"icon-allow-overlap": true,
4029+
"icon-optional": false
4030+
},
4031+
"paint": {
4032+
"text-color": "#333",
4033+
"text-halo-color": "rgba(255,255,255,0.8)",
4034+
"text-halo-width": 1.2
4035+
}
4036+
},
4037+
{
4038+
"id": "place_city_1",
4039+
"type": "symbol",
4040+
"metadata": {},
4041+
"source": "openmaptiles",
4042+
"source-layer": "place",
4043+
"minzoom": 5,
4044+
"filter": [
4045+
"all",
4046+
[
4047+
"==",
4048+
"class",
4049+
"city"
4050+
],
4051+
[
4052+
"==",
4053+
"rank",
4054+
1
38524055
]
38534056
],
38544057
"layout": {

0 commit comments

Comments
 (0)