basemap/layers/labels/style.js (1,300 lines of code) (raw):
/**
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied. See the License for the specific language governing permissions and limitations under
the License.
**/
import theme from "../../theme.js";
export default [
{
id: 'dormitory_labels',
type: 'symbol',
filter: [
'all',
['==', ['get', 'building'], 'dormitory'],
['>=', ['zoom'], 16],
],
source: 'baremaps',
'source-layer': 'building',
layout: {
visibility: 'visible',
'text-font': ['Noto Sans Regular'],
'text-field': ['get', 'name'],
'text-size': [
'interpolate',
['exponential', 1.2],
['zoom'],
16,
9,
17,
10,
18,
11,
],
'text-max-width': 4,
},
paint: {
'text-color': theme.labelsStyleDormitoryLabelsTextColor,
'text-halo-color': theme.labelsStyleDormitoryLabelsTextHaloColor,
'text-halo-width': 0.8,
},
},
{
id: 'quarry_labels',
type: 'symbol',
filter: ['all', ['==', ['get', 'landuse'], 'quarry'], ['>=', ['zoom'], 16]],
source: 'baremaps',
'source-layer': 'landuse',
layout: {
visibility: 'visible',
'text-font': ['Noto Sans Italic'],
'text-field': ['get', 'name'],
'text-size': [
'interpolate',
['exponential', 1.2],
['zoom'],
16,
12,
17,
14,
18,
16,
],
'text-max-width': 4,
},
paint: {
'text-color': theme.labelsStyleQuarryLabelsTextColor,
'text-halo-color': theme.labelsStyleQuarryLabelsTextHaloColor,
'text-halo-width': 0.8,
},
},
{
id: 'building_school_labels',
type: 'symbol',
filter: [
'all',
['==', ['get', 'building'], 'school'],
['>=', ['zoom'], 16],
],
source: 'baremaps',
'source-layer': 'building',
layout: {
visibility: 'visible',
'text-font': ['Noto Sans Regular'],
'text-field': ['get', 'name'],
'text-size': [
'interpolate',
['exponential', 1.2],
['zoom'],
16,
9,
17,
10,
18,
11,
],
'text-max-width': 4,
},
paint: {
'text-color': theme.labelsStyleBuildingSchoolLabelsTextColor,
'text-halo-color': theme.labelsStyleBuildingSchoolLabelsTextHaloColor,
'text-halo-width': 0.8,
},
},
{
id: 'building_labels',
type: 'symbol',
filter: [
'all',
[
'any',
['==', ['get', 'building'], 'hospital'],
['==', ['get', 'building'], 'yes'],
],
['!', ['has', 'amenity']],
['!', ['has', 'historic']],
['>=', ['zoom'], 16],
],
source: 'baremaps',
'source-layer': 'building',
layout: {
visibility: 'visible',
'text-font': ['Noto Sans Regular'],
'text-field': ['get', 'name'],
'text-size': [
'interpolate',
['exponential', 1.2],
['zoom'],
16,
9,
17,
10,
18,
11,
],
'text-max-width': 4,
},
paint: {
'text-color': theme.labelsStyleBuildingLabelsTextColor,
'text-halo-color': theme.labelsStyleBuildingLabelsTextHaloColor,
'text-halo-width': 0.8,
},
},
{
id: 'social_facility_labels',
type: 'symbol',
filter: [
'all',
['==', ['get', 'amenity'], 'social_facility'],
['>=', ['zoom'], 16],
],
source: 'baremaps',
'source-layer': 'amenity',
layout: {
visibility: 'visible',
'icon-image': ['get', 'amenity'],
'icon-size': 1,
'icon-anchor': 'bottom',
'icon-allow-overlap': true,
'text-font': ['Noto Sans Regular'],
'text-field': ['get', 'name'],
'text-size': 11,
'text-max-width': 4,
'text-anchor': 'top',
'text-optional': true,
},
paint: {
'text-color': theme.labelsStyleSocialFacilityLabelsTextColor,
'text-halo-color': theme.labelsStyleSocialFacilityLabelsTextHaloColor,
'text-halo-width': 0.8,
'icon-color': theme.labelsStyleSocialFacilityLabelsIconColor,
'icon-halo-color': theme.labelsStyleSocialFacilityLabelsIconHaloColor,
'icon-halo-width': 1,
},
},
{
id: 'pitch_labels',
type: 'symbol',
filter: ['all', ['==', ['get', 'leisure'], 'pitch'], ['>=', ['zoom'], 15]],
source: 'baremaps',
'source-layer': 'leisure',
layout: {
visibility: 'visible',
'text-font': ['Noto Sans Italic'],
'text-field': ['get', 'name'],
'text-size': [
'interpolate',
['exponential', 1.2],
['zoom'],
15,
10,
17,
16,
],
'text-max-width': 4,
},
paint: {
'text-color': theme.labelsStylePitchLabelsTextColor,
'text-halo-color': theme.labelsStylePitchLabelsTextHaloColor,
'text-halo-width': 0.8,
},
},
{
id: 'theatre_labels',
type: 'symbol',
filter: [
'all',
['==', ['get', 'amenity'], 'theatre'],
['>=', ['zoom'], 16],
],
source: 'baremaps',
'source-layer': 'amenity',
layout: {
visibility: 'visible',
'icon-image': ['get', 'amenity'],
'icon-size': 1,
'icon-anchor': 'bottom',
'icon-allow-overlap': true,
'text-font': ['Noto Sans Regular'],
'text-field': ['get', 'name'],
'text-size': 11,
'text-max-width': 4,
'text-anchor': 'top',
'text-optional': true,
},
paint: {
'text-color': theme.labelsStyleTheatreLabelsTextColor,
'text-halo-color': theme.labelsStyleTheatreLabelsTextHaloColor,
'text-halo-width': 0.8,
'icon-color': theme.labelsStyleTheatreLabelsIconColor,
'icon-halo-color': theme.labelsStyleTheatreLabelsIconHaloColor,
'icon-halo-width': 1,
},
},
{
id: 'community_centre_labels',
type: 'symbol',
filter: [
'all',
['==', ['get', 'amenity'], 'community_centre'],
['>=', ['zoom'], 16],
],
source: 'baremaps',
'source-layer': 'amenity',
layout: {
visibility: 'visible',
'icon-image': ['get', 'amenity'],
'icon-size': 1,
'icon-anchor': 'bottom',
'icon-allow-overlap': true,
'text-font': ['Noto Sans Regular'],
'text-field': ['get', 'name'],
'text-size': 11,
'text-max-width': 4,
'text-anchor': 'top',
'text-optional': true,
},
paint: {
'text-color': theme.labelsStyleCommunityCentreLabelsTextColor,
'text-halo-color': theme.labelsStyleCommunityCentreLabelsTextHaloColor,
'text-halo-width': 0.8,
'icon-color': theme.labelsStyleCommunityCentreLabelsIconColor,
'icon-halo-color': theme.labelsStyleCommunityCentreLabelsIconHaloColor,
'icon-halo-width': 1,
},
},
{
id: 'sports_hall_labels',
type: 'symbol',
filter: [
'all',
['==', ['get', 'leisure'], 'sports_hall'],
['>=', ['zoom'], 16],
],
source: 'baremaps',
'source-layer': 'leisure',
layout: {
visibility: 'visible',
'text-font': ['Noto Sans Regular'],
'text-field': ['get', 'name'],
'text-size': [
'interpolate',
['exponential', 1.2],
['zoom'],
16,
10,
17,
14,
],
'text-max-width': 4,
},
paint: {
'text-color': theme.labelsStyleSportHallLabelsTextColor,
'text-halo-color': theme.labelsStyleSportHallLabelsTextHaloColor,
'text-halo-width': 0.8,
},
},
{
id: 'school_labels',
type: 'symbol',
filter: ['all', ['==', ['get', 'amenity'], 'school'], ['>=', ['zoom'], 15]],
source: 'baremaps',
'source-layer': 'amenity',
layout: {
visibility: 'visible',
'text-font': ['Noto Sans Italic'],
'text-field': ['get', 'name'],
'text-size': [
'interpolate',
['exponential', 1.2],
['zoom'],
15,
9,
17,
14,
],
'text-max-width': 4,
},
paint: {
'text-color': theme.labelsStyleSchoolLabelsTextColor,
'text-halo-color': theme.labelsStyleSchoolLabelsTextHaloColor,
'text-halo-width': 0.8,
},
},
{
id: 'college_labels',
type: 'symbol',
filter: [
'all',
['==', ['get', 'amenity'], 'college'],
['>=', ['zoom'], 15],
],
source: 'baremaps',
'source-layer': 'amenity',
layout: {
visibility: 'visible',
'text-font': ['Noto Sans Italic'],
'text-field': ['get', 'name'],
'text-size': [
'interpolate',
['exponential', 1.2],
['zoom'],
15,
10,
17,
14,
],
'text-max-width': 4,
},
paint: {
'text-color': theme.labelsStyleCollegeLabelsTextColor,
'text-halo-color': theme.labelsStyleCollegeLabelsTextHaloColor,
'text-halo-width': 0.8,
},
},
{
id: 'courthouse_labels',
type: 'symbol',
filter: [
'all',
['==', ['get', 'amenity'], 'courthouse'],
['>=', ['zoom'], 15],
],
source: 'baremaps',
'source-layer': 'amenity',
layout: {
visibility: 'visible',
'icon-image': ['get', 'amenity'],
'icon-size': 1,
'icon-anchor': 'bottom',
'icon-allow-overlap': true,
'text-font': ['Noto Sans Regular'],
'text-field': ['get', 'name'],
'text-size': 11,
'text-max-width': 4,
'text-anchor': 'top',
'text-optional': true,
},
paint: {
'text-color': theme.labelsStyleCourthouseLabelsTextColor,
'text-halo-color': theme.labelsStyleCourthouseLabelsTextHaloColor,
'text-halo-width': 0.8,
'icon-color': theme.labelsStyleCourthouseLabelsIconColor,
'icon-halo-color': theme.labelsStyleCourthouseLabelsIconHaloColor,
'icon-halo-width': 1,
},
},
{
id: 'parking_labels',
type: 'symbol',
filter: [
'all',
['==', ['get', 'amenity'], 'parking'],
['>=', ['zoom'], 15],
],
source: 'baremaps',
'source-layer': 'amenity',
layout: {
visibility: 'visible',
'icon-image': ['get', 'amenity'],
'icon-size': 1,
'icon-anchor': 'bottom',
'text-font': ['Noto Sans Regular'],
'text-field': ['get', 'name'],
'text-size': [
'interpolate',
['exponential', 1.2],
['zoom'],
15,
9,
18,
11,
],
'text-anchor': 'top',
'text-optional': true,
'text-max-width': 4,
},
paint: {
'text-color': theme.labelsStyleParkingLabelsTextColor,
'text-halo-color': theme.labelsStyleParkingLabelsTextHaloColor,
'text-halo-width': 0.8,
'icon-color': theme.labelsStyleParkingLabelsIconColor,
'icon-halo-color': theme.labelsStyleParkingLabelsIconHaloColor,
'icon-halo-width': 1,
},
},
{
id: 'industrial_labels',
type: 'symbol',
filter: [
'all',
['==', ['get', 'landuse'], 'industrial'],
['>=', ['zoom'], 14],
],
source: 'baremaps',
'source-layer': 'landuse',
layout: {
visibility: 'visible',
'text-font': ['Noto Sans Italic'],
'text-field': ['get', 'name'],
'text-size': [
'interpolate',
['exponential', 1.2],
['zoom'],
14,
10,
17,
16,
],
'text-max-width': 4,
},
paint: {
'text-color': theme.labelsStyleIndustrialLabelsTextColor,
'text-halo-color': theme.labelsStyleIndustrialLabelsTextHaloColor,
'text-halo-width': 0.8,
},
},
{
id: 'poi_cafes',
type: 'symbol',
filter: ['all', ['==', ['get', 'amenity'], 'cafe'], ['>=', ['zoom'], 15]],
source: 'baremaps',
'source-layer': 'points',
layout: {
'icon-image': 'cafe',
'icon-size': 1,
'icon-anchor': 'bottom',
'text-font': ['Noto Sans Regular'],
'text-size': 11,
'text-field': ['get', 'name'],
'text-anchor': 'top',
visibility: 'visible',
'text-optional': true,
'text-max-width': 5,
},
paint: {
'text-color': theme.labelsStylePoicafeTextColor,
'icon-color': theme.labelsStylePoicafeIconColor,
'icon-opacity': 1,
'icon-translate-anchor': 'map',
'icon-halo-color': theme.labelsStylePoicafeIconHaloColor,
'icon-halo-width': 1,
'text-halo-width': 1,
'text-halo-color': theme.labelsStylePoicafeTextHaloColor,
},
},
{
id: 'poi_atm',
type: 'symbol',
filter: ['all', ['==', ['get', 'amenity'], 'atm'], ['>=', ['zoom'], 16]],
source: 'baremaps',
'source-layer': 'points',
layout: {
'icon-image': 'atm',
'icon-size': 1,
'icon-anchor': 'bottom',
'text-font': ['Noto Sans Regular'],
'text-size': 11,
'text-field': ['get', 'name'],
'text-anchor': 'top',
visibility: 'visible',
'text-optional': true,
'text-max-width': 5,
},
paint: {
'text-color': theme.labelsStylePoiAtmTextColor,
'icon-color': theme.labelsStylePoiAtmIconColor,
'icon-opacity': 1,
'icon-translate-anchor': 'map',
'icon-halo-color': theme.labelsStylePoiAtmIconHaloColor,
'icon-halo-width': 1,
'text-halo-width': 1,
'text-halo-color': theme.labelsStylePoiAtmTextHaloColor,
},
},
{
id: 'poi_fuel_charging',
type: 'symbol',
filter: [
'all',
['in', ['get', 'amenity'], ['literal', ['charging_station', 'fuel']]],
['>=', ['zoom'], 16],
],
source: 'baremaps',
'source-layer': 'points',
layout: {
'icon-image': ['get', 'amenity'],
'icon-size': 1,
'icon-anchor': 'bottom',
'text-font': ['Noto Sans Regular'],
'text-size': 11,
'text-field': ['get', 'name'],
'text-anchor': 'top',
visibility: 'visible',
'text-optional': true,
'text-max-width': 5,
},
paint: {
'text-color': theme.labelsStylePoiFuelChargingTextColor,
'icon-color': theme.labelsStylePoiFuelChargingIconColor,
'icon-opacity': 1,
'icon-translate-anchor': 'map',
'icon-halo-color': theme.labelsStylePoiFuelChargingIconHaloColor,
'icon-halo-width': 1,
'text-halo-width': 1,
'text-halo-color': theme.labelsStylePoiFuelChargingTextHaloColor,
},
},
{
id: 'poi_parkings',
type: 'symbol',
filter: [
'all',
[
'any',
[
'all',
['==', ['get', 'amenity'], 'parking_entrance'],
['==', ['get', 'parking'], 'underground'],
],
[
'in',
['get', 'amenity'],
['literal', ['parking', 'motorcycle_parking']],
],
],
['>=', ['zoom'], 16],
],
source: 'baremaps',
'source-layer': 'points',
layout: {
'icon-image': ['get', 'amenity'],
'icon-size': 1,
'icon-anchor': 'bottom',
'text-font': ['Noto Sans Regular'],
'text-size': 11,
'text-field': ['get', 'name'],
'text-anchor': 'top',
visibility: 'visible',
'text-optional': true,
'text-max-width': 5,
},
paint: {
'text-color': theme.labelsStylePoiParkingTextColor,
'icon-color': theme.labelsStylePoiParkingIconColor,
'icon-opacity': 1,
'icon-translate-anchor': 'map',
'icon-halo-color': theme.labelsStylePoiParkingIconHaloColor,
'icon-halo-width': 1,
'text-halo-width': 1,
'text-halo-color': theme.labelsStylePoiParkingTextHaloColor,
},
},
{
id: 'poi_hotels',
type: 'symbol',
filter: [
'all',
[
'in',
['get', 'tourism'],
['literal', ['guest_house', 'hostel', 'hotel', 'motel']],
],
['>=', ['zoom'], 16],
],
source: 'baremaps',
'source-layer': 'points',
layout: {
'icon-image': ['get', 'tourism'],
'icon-size': 1,
'icon-anchor': 'bottom',
'text-font': ['Noto Sans Regular'],
'text-size': 11,
'text-field': ['get', 'name'],
'text-anchor': 'top',
visibility: 'visible',
'text-optional': true,
'text-max-width': 5,
},
paint: {
'text-color': theme.labelsStylePoiHotelTextColor,
'icon-color': theme.labelsStylePoiHotelIconColor,
'icon-opacity': 1,
'icon-translate-anchor': 'map',
'icon-halo-color': theme.labelsStylePoiHotelIconHaloColor,
'icon-halo-width': 1,
'text-halo-width': 1,
'text-halo-color': theme.labelsStylePoiHotelTextHaloColor,
},
},
{
id: 'poi_shops',
type: 'symbol',
filter: [
'any',
[
'all',
[
'in',
['get', 'shop'],
['literal', ['department_store', 'supermarket']],
],
['>=', ['zoom'], 15],
],
[
'all',
[
'in',
['get', 'shop'],
[
'literal',
[
'alcohol',
'bakery',
'beverages',
'butcher',
'coffee',
'confectionery',
'convenience',
'deli',
'dairy',
'greengrocer',
'tea',
'department_store',
'supermarket',
'bag',
'clothes',
'fabric',
'jewelry',
'shoes',
'charity',
'second_hand',
'variety_store',
'beauty',
'chemist',
'hairdresser',
'medical_supply',
'optician',
'perfumery',
'florist',
'garden_centre',
'houseware',
'paint',
'trade',
'bed',
'carpet',
'furniture',
'interior_decoration',
'computer',
'electronics',
'hifi',
'mobile_phone',
'bicycle',
'boat',
'car',
'car_repair',
'motorcycle',
'outdoor',
'sports',
'tyres',
'art',
'music',
'musical_instrument',
'photo',
'video',
'video_games',
'gift',
'newsagent',
'stationery',
'ticket',
'bookmaker',
'copyshop',
'laundry',
'pet',
'tobacco',
'toys',
'travel_agency',
'massage',
],
],
],
['>=', ['zoom'], 17],
],
],
source: 'baremaps',
'source-layer': 'points',
layout: {
'icon-image': ['get', 'shop'],
'icon-size': 1,
'icon-anchor': 'bottom',
'text-font': ['Noto Sans Regular'],
'text-size': 11,
'text-field': ['get', 'name'],
'text-anchor': 'top',
visibility: 'visible',
'text-optional': true,
'text-max-width': 5,
},
paint: {
'text-color': [
'case',
[
'in',
['get', 'shop'],
[
'literal',
[
'alcohol',
'bakery',
'beverages',
'butcher',
'coffee',
'confectionery',
'convenience',
'deli',
'dairy',
'greengrocer',
'tea',
'department_store',
'supermarket',
'bag',
'clothes',
'fabric',
'jewelry',
'shoes',
'charity',
'second_hand',
'variety_store',
'beauty',
'chemist',
'hairdresser',
'medical_supply',
'optician',
'perfumery',
'florist',
'garden_centre',
'houseware',
'paint',
'trade',
'bed',
'carpet',
'furniture',
'interior_decoration',
'computer',
'electronics',
'hifi',
'mobile_phone',
'bicycle',
'boat',
'car',
'car_repair',
'motorcycle',
'outdoor',
'sports',
'tyres',
'art',
'music',
'musical_instrument',
'photo',
'video',
'video_games',
'gift',
'newsagent',
'stationery',
'ticket',
'bookmaker',
'copyshop',
'laundry',
'pet',
'tobacco',
'toys',
'travel_agency',
],
],
],
theme.labelsStylePoiShopsTextColorLiteral,
['==', ['get', 'shop'], 'massage'],
theme.labelsStylePoiShopsTextColorMassage,
theme.labelsStylePoiShopsTextColor,
],
'icon-color': [
'case',
[
'in',
['get', 'shop'],
[
'literal',
[
'alcohol',
'bakery',
'beverages',
'butcher',
'coffee',
'confectionery',
'convenience',
'deli',
'dairy',
'greengrocer',
'tea',
'department_store',
'supermarket',
'bag',
'clothes',
'fabric',
'jewelry',
'shoes',
'charity',
'second_hand',
'variety_store',
'beauty',
'chemist',
'hairdresser',
'medical_supply',
'optician',
'perfumery',
'florist',
'garden_centre',
'houseware',
'paint',
'trade',
'bed',
'carpet',
'furniture',
'interior_decoration',
'computer',
'electronics',
'hifi',
'mobile_phone',
'bicycle',
'boat',
'car',
'car_repair',
'motorcycle',
'outdoor',
'sports',
'tyres',
'art',
'music',
'musical_instrument',
'photo',
'video',
'video_games',
'gift',
'newsagent',
'stationery',
'ticket',
'bookmaker',
'copyshop',
'laundry',
'pet',
'tobacco',
'toys',
'travel_agency',
],
],
],
theme.labelsStylePoiShopsIconColorLiteral,
['==', ['get', 'shop'], 'massage'],
theme.labelsStylePoiShopsIconColorMassage,
theme.labelsStylePoiShopsIconColor,
],
'icon-opacity': 1,
'icon-translate-anchor': 'map',
'icon-halo-color': theme.labelsStylePoiShopsIconHaloColor,
'icon-halo-width': 1,
'text-halo-width': 1,
'text-halo-color': theme.labelsStylePoiShopsTextHaloColor,
},
},
{
id: 'poi_restaurants',
type: 'symbol',
filter: [
'all',
['in', ['get', 'amenity'], ['literal', ['restaurant', 'food_court']]],
['>=', ['zoom'], 15],
],
source: 'baremaps',
'source-layer': 'points',
layout: {
'icon-image': 'restaurant',
'icon-size': 1,
'icon-anchor': 'bottom',
'text-font': ['Noto Sans Regular'],
'text-size': 11,
'text-field': ['get', 'name'],
'text-anchor': 'top',
visibility: 'visible',
'text-optional': true,
'text-max-width': 5,
},
paint: {
'text-color': theme.labelsStylePoiRestaurantsTextColor,
'icon-color': theme.labelsStylePoiRestaurantsIconColor,
'icon-opacity': 1,
'icon-translate-anchor': 'map',
'icon-halo-color': theme.labelsStylePoiReaturantsIconHaloColor,
'icon-halo-width': 1,
'text-halo-width': 1,
'text-halo-color': theme.labelsStylePoiRestaurantsTextHaloColor,
},
},
{
id: 'poi_fast-food',
type: 'symbol',
filter: [
'all',
['==', ['get', 'amenity'], 'fast_food'],
['>=', ['zoom'], 15],
],
source: 'baremaps',
'source-layer': 'points',
layout: {
'icon-image': 'fast_food',
'icon-size': 1,
'icon-anchor': 'bottom',
'text-font': ['Noto Sans Regular'],
'text-size': 11,
'text-field': ['get', 'name'],
'text-anchor': 'top',
visibility: 'visible',
'text-optional': true,
'text-max-width': 5,
},
paint: {
'text-color': theme.labelsStylePoiFastFoodTextColor,
'icon-color': theme.labelsStylePoiFastFoodIconColor,
'icon-opacity': 1,
'icon-translate-anchor': 'map',
'icon-halo-color': theme.labelsStylePoiFastFoodIconHaloColor,
'icon-halo-width': 1,
'text-halo-width': 1,
'text-halo-color': theme.labelsStylePoiFastFoodTextHaloColor,
},
},
{
id: 'poi_bars/pubs',
type: 'symbol',
filter: [
'all',
['in', ['get', 'amenity'], ['literal', ['bar', 'biergarten', 'pub']]],
['>=', ['zoom'], 15],
],
source: 'baremaps',
'source-layer': 'points',
layout: {
'icon-image': ['get', 'amenity'],
'icon-size': 1,
'icon-anchor': 'bottom',
'text-font': ['Noto Sans Regular'],
'text-size': 11,
'text-field': ['get', 'name'],
'text-anchor': 'top',
visibility: 'visible',
'text-optional': true,
'text-max-width': 5,
},
paint: {
'text-color': theme.labelsStylePoiBarPubTextColor,
'icon-color': theme.labelsStylePoiBarPubIconColor,
'icon-opacity': 1,
'icon-translate-anchor': 'map',
'icon-halo-color': theme.labelsStylePoiBarPubIconHaloColor,
'icon-halo-width': 1,
'text-halo-width': 1,
'text-halo-color': theme.labelsStylePoiBarPubTextHaloColor,
},
},
{
id: 'poi_pharmacies',
type: 'symbol',
filter: [
'all',
['==', ['get', 'amenity'], 'pharmacy'],
['>=', ['zoom'], 16],
],
source: 'baremaps',
'source-layer': 'points',
layout: {
'icon-image': 'pharmacy',
'icon-size': 1,
'icon-anchor': 'bottom',
'text-font': ['Noto Sans Regular'],
'text-size': 11,
'text-field': ['get', 'name'],
'text-anchor': 'top',
visibility: 'visible',
'text-optional': true,
'text-max-width': 5,
},
paint: {
'text-color': theme.labelsStylePoiPharmacieTextColor,
'icon-color': theme.labelsStylePoiPharmacieIconColor,
'icon-opacity': 1,
'icon-translate-anchor': 'map',
'icon-halo-color': theme.labelsStylePoiPharmacieIconHaloColor,
'icon-halo-width': 1,
'text-halo-width': 1,
'text-halo-color': theme.labelsStylePoiPharmacieTextHaloColor,
},
},
{
id: 'zoo_labels',
type: 'symbol',
filter: ['all', ['==', 'tourism', 'zoo']],
source: 'baremaps',
'source-layer': 'tourism',
layout: {
visibility: 'visible',
'text-font': ['Noto Sans Bold'],
'text-field': ['get', 'name'],
'text-size': [
'interpolate',
['exponential', 1.2],
['zoom'],
13,
12,
16,
16,
18,
20,
],
},
paint: {
'text-color': theme.labelsStyleZooLabelsTextColor,
'text-halo-color': theme.labelsStyleZooLabelsTextHaloColor,
'text-halo-width': 1,
},
},
{
id: 'monument_labels',
type: 'symbol',
filter: [
'all',
['==', ['get', 'historic'], 'monument'],
['>=', ['zoom'], 15],
],
source: 'baremaps',
'source-layer': 'building',
layout: {
visibility: 'visible',
'icon-image': ['get', 'historic'],
'icon-size': 1,
'icon-anchor': 'bottom',
'icon-allow-overlap': true,
'text-font': ['Noto Sans Regular'],
'text-field': ['get', 'name'],
'text-size': 11,
'text-max-width': 4,
'text-anchor': 'top',
'text-optional': true,
},
paint: {
'text-color': theme.labelsStyleMonumentLabelsTextColor,
'text-halo-color': theme.labelsStyleMonumentLabelsTextHaloColor,
'text-halo-width': 0.8,
'icon-color': theme.labelsStyleMonumentLabelsIconColor,
'icon-halo-color': theme.labelsStyleMonumentLabelsIconHaloColor,
'icon-halo-width': 1,
},
},
{
id: 'cemetery_labels',
type: 'symbol',
filter: [
'all',
['==', ['get', 'landuse'], 'cemetery'],
['>=', ['zoom'], 15],
],
source: 'baremaps',
'source-layer': 'landuse',
layout: {
visibility: 'visible',
'text-font': ['Noto Sans Italic'],
'text-field': ['get', 'name'],
'text-size': [
'interpolate',
['exponential', 1.2],
['zoom'],
15,
10,
17,
16,
],
'text-max-width': 4,
},
paint: {
'text-color': theme.labelsStyleCemeteryLabelsTextColor,
'text-halo-color': theme.labelsStyleCemeteryLabelsTextHaloColor,
'text-halo-width': 0.8,
},
},
{
id: 'forest_labels',
type: 'symbol',
filter: ['all', ['==', ['get', 'landuse'], 'forest'], ['>=', ['zoom'], 15]],
source: 'baremaps',
'source-layer': 'landuse',
layout: {
visibility: 'visible',
'text-font': ['Noto Sans Italic'],
'text-field': ['get', 'name'],
'text-size': [
'interpolate',
['exponential', 1.2],
['zoom'],
15,
12,
17,
16,
],
'text-max-width': 4,
},
paint: {
'text-color': theme.labelsStyleForestLabelsTextColor,
'text-halo-color': theme.labelsStyleForestLabelsTextHaloColor,
'text-halo-width': 0.8,
},
},
{
id: 'stadium_labels',
type: 'symbol',
filter: [
'all',
['==', ['get', 'leisure'], 'stadium'],
['>=', ['zoom'], 15],
],
source: 'baremaps',
'source-layer': 'leisure',
layout: {
visibility: 'visible',
'text-font': ['Noto Sans Italic'],
'text-field': ['get', 'name'],
'text-size': [
'interpolate',
['exponential', 1.2],
['zoom'],
15,
9,
17,
16,
],
'text-max-width': 4,
},
paint: {
'text-color': theme.labelsStyleStadiumLabelsTextColor,
'text-halo-color': theme.labelsStyleStadiumLabelsTextHaloColor,
'text-halo-width': 0.8,
},
},
{
id: 'park_labels',
type: 'symbol',
filter: ['all', ['==', ['get', 'leisure'], 'park'], ['>=', ['zoom'], 14]],
source: 'baremaps',
'source-layer': 'leisure',
layout: {
visibility: 'visible',
'text-font': ['Noto Sans Italic'],
'text-field': ['get', 'name'],
'text-size': [
'interpolate',
['exponential', 1.2],
['zoom'],
14,
10,
17,
18,
],
'text-max-width': 4,
},
paint: {
'text-color': theme.labelsStyleParkLabelsTextColor,
'text-halo-color': theme.labelsStyleParkLabelsTextHaloColor,
'text-halo-width': 0.8,
},
},
{
id: 'hospital_labels',
type: 'symbol',
filter: [
'all',
['==', ['get', 'amenity'], 'hospital'],
['>=', ['zoom'], 14],
],
source: 'baremaps',
'source-layer': 'amenity',
layout: {
visibility: 'visible',
'icon-image': ['get', 'amenity'],
'icon-size': 1,
'icon-anchor': 'bottom',
'text-font': ['Noto Sans Regular'],
'text-field': ['step', ['zoom'], '', 14, '', 15, ['get', 'name']],
'text-size': 11,
'text-max-width': 4,
'text-anchor': 'top',
'text-optional': true,
},
paint: {
'text-color': theme.labelsStyleHopitalLabelsTextColor,
'text-halo-color': theme.labelsStyleHopitalLabelsTextHaloColor,
'text-halo-width': 0.8,
'icon-color': theme.labelsStyleHopitalLabelsIconColor,
'icon-halo-color': theme.labelsStyleHopitalLabelsIconHaloColor,
'icon-halo-width': 1,
},
},
{
id: 'motorway_junction_ref',
type: 'symbol',
filter: ['all', ['==', 'highway', 'motorway_junction']],
source: 'baremaps',
'source-layer': 'points',
layout: {
visibility: 'visible',
'text-font': ['Noto Sans Italic'],
'text-field': ['get', 'ref'],
'text-size': [
'interpolate',
['exponential', 1.2],
['zoom'],
10,
9,
11,
9.5,
12,
10,
],
},
maxzoom: 12,
paint: {
'text-color': theme.labelsStyleMotorwayJunctionRefTextColor,
'text-halo-color': theme.labelsStyleMotorwayJunctionRefTextHaloColor,
'text-halo-width': 1.2,
},
},
{
id: 'motorway_junction_name',
type: 'symbol',
filter: ['all', ['==', 'highway', 'motorway_junction']],
source: 'baremaps',
'source-layer': 'points',
layout: {
visibility: 'visible',
'text-font': ['Noto Sans Italic'],
'text-field': ['format', ['get', 'name'], '\n', ['get', 'ref']],
'text-size': [
'interpolate',
['exponential', 1.2],
['zoom'],
12,
9,
15,
10,
18,
11,
],
},
minzoom: 12,
paint: {
'text-color': theme.labelsStyleMotorwayJunctionNameTextColor,
'text-halo-color': theme.labelsStyleMotorwayJunctionNameTextHaloColor,
'text-halo-width': 1.2,
},
},
]