Back to list
dave1010

maps

by dave1010

Collection of tools

6🍴 0📅 Jan 5, 2026

SKILL.md


name: maps description: "Use when building interactive map tools - Explains MapLibre setup, tiles, and common UI patterns."

MapLibre basics

  • Include MapLibre's CSS before your styles and load the script from https://unpkg.com/maplibre-gl@3.6.2/dist/maplibre-gl.js.
  • Keep the map container absolutely positioned to fill the viewport (see #map styles in tools/map-explorer/index.html).
  • Use the OpenFreeMap Liberty style (https://tiles.openfreemap.org/styles/liberty) unless a different basemap is required.
  • Add navigation controls with map.addControl(new maplibregl.NavigationControl(), 'top-right');.
  • Guard against missing globals: if typeof maplibregl === 'undefined', disable map-dependent UI and show an error.

Geolocation pattern

  • Provide a dedicated button for navigator.geolocation.getCurrentPosition.
  • Disable the button while locating, apply a loading state, and reset it in success/error callbacks.
  • On success, create or update a maplibregl.Marker and map.easeTo the new center.
  • On errors, surface user-friendly messages for permission, availability, and timeout cases.

Overlay & interaction tips

  • Keep status text in small, unobtrusive elements and update it via helper functions.

Accessibility & layout

  • Generally prefer maps that take up the whole viewport, with UI controls and panels overlayed
  • Footer links in an overlay too.

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon