web_lib

Common web application libraries
git clone https://radroots.dev/git/web_lib.git
Log | Files | Refs | LICENSE

map.ts (584B)


      1 export const CFG_MAP = {
      2     styles: {
      3         base: {
      4             light: `https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json`,
      5             dark: `https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json`
      6         }
      7     },
      8     popup: {
      9         dot: {
     10             offset: [0, -10] as [number, number]
     11         }
     12     },
     13     coords: {
     14         default: {
     15             lat: 0,
     16             lng: 0,
     17         }
     18     }
     19 };
     20 
     21 export const focus_map_marker = (): void => {
     22     const el = document.querySelector(".maplibregl-marker");
     23     if (el instanceof HTMLElement) el.click();
     24 };