UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

2 lines (1 loc) • 2.83 kB
export function recolorStyle(_,s){return{..._,layers:_.layers.map(l=>{const n=s[l.id];return n?{...l,paint:{...l.paint,...n}}:l})}}const o={"text-color":"#697b89","text-halo-color":"rgba(255,255,255,0.5)"},e={"text-color":"#8a99a4","text-halo-color":"#fafaf8"},r={"text-color":"#838383","text-halo-color":"#fff"},t={"text-color":"#7a96a0","text-halo-color":"#f5f5f3"},i={"fill-color":"rgba(234, 241, 233, 0.5)"},a={"line-color":"#dddddd"};export const POSITRON_PAINT={background:{"background-color":"#fafaf8"},park:i,landcover_wood:i,landuse_residential:{"fill-color":"rgba(237, 237, 237, 0.5)"},water:{"fill-color":"#d4dadc"},waterway:{"line-color":"#d1dbdf"},building:{"fill-color":"#ededed","fill-outline-color":"#dfdfdf"},highway_minor:{"line-color":["match",["get","class"],"service","#efefef","#e6e6e6"]},tunnel_motorway_casing:a,highway_major_casing:a,highway_motorway_casing:a,highway_motorway_bridge_casing:a,highway_path:{"line-color":"#d5d5d5"},boundary_2:{"line-color":"#ebd6d8"},boundary_3:{"line-color":"#e1c5c7"},boundary_disputed:{"line-color":"#ebd6d8"},"highway-name-path":r,"highway-name-minor":r,"highway-name-major":r,waterway_line_label:t,water_name_point_label:t,water_name_line_label:t,label_other:o,label_village:o,label_town:o,label_city:o,label_city_capital:o,label_state:{"text-color":"#97a4ae","text-halo-color":"#fafaf8"},label_country_1:e,label_country_2:e,label_country_3:e};const h={"line-color":"#232323"},g={"line-color":"rgb(96, 96, 96)"},d={"text-color":"#666","text-halo-color":"#222"},b={"text-color":"rgb(211, 228, 236)","text-halo-color":"#222"},c={"text-color":"rgb(158, 182, 189)","text-halo-color":"#111"},y={"fill-opacity":0};export const DARK_MATTER_PAINT={background:{"background-color":"#0e0e0e"},landcover_wood:y,landuse_park:y,water:{"fill-color":"#2c353c"},waterway:{"line-color":"rgb(63, 90, 109)"},building:{"fill-color":"#393939","fill-outline-color":"#0e0e0e"},highway_path:{"line-color":"#262626"},highway_minor:{"line-color":["match",["get","class"],"minor","rgb(65, 71, 88)","service","#1c1c1c","#262626"]},highway_major_casing:h,highway_major_inner:{"line-color":"rgb(83, 86, 102)"},highway_motorway_casing:h,highway_motorway_inner:{"line-color":"rgb(73, 73, 73)"},highway_name_other:{"text-color":"rgb(181, 180, 180)","text-halo-color":"#111"},water_name:{"text-color":"rgb(155, 155, 155)","text-halo-color":"#181818"},boundary_state:{"line-color":"rgb(103, 103, 114)"},"boundary_country_z0-4":g,"boundary_country_z5-":g,place_other:d,place_suburb:d,place_village:{"text-color":"rgb(154, 153, 153)","text-halo-color":"#222"},place_town:{"text-color":"rgb(204, 208, 228)","text-halo-color":"#222"},place_city:b,place_city_large:b,place_state:{"text-color":"rgb(203, 230, 230)","text-halo-color":"#111"},place_country_other:c,place_country_minor:c,place_country_major:c};