Przejdź do treści
Biblioteka skilli
Dane i analityka · Budowanie i kod

maps

/maps

Pokazuje obszary, punkty i pola danych na mapie webowej przez MapLibre z darmowymi kafelkami, także z alertami CAP zapisanymi jako GeoJSON.

Repozytorium
skills ↗
Licencja
MPL-2.0
Ostatnia zmiana repozytorium
12.11.2026

Ocena i bezpieczeństwo

90/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść25 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 12.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MPL-2.0, otwarta.

Co robi i kiedy

Pokazuje obszary, punkty i pola danych na mapie webowej przez MapLibre z darmowymi kafelkami, także z alertami CAP zapisanymi jako GeoJSON.

Oryginalny opis (EN)

Show areas, points and data fields on a web map with MapLibre and free tiles first, or Mapbox GL when a project already uses it. Covers CAP alert areas to GeoJSON, data-driven styling, performance and token safety. Use for any map on a page, an app or an image.

Jak działa

  1. Stack
  2. CAP 1.2 areas to GeoJSON
  3. Style
  4. Performance
  5. Check before a PR
Sekcje z nagłówków SKILL.md, w oryginale · 50 linii, 414 słów
Podgląd SKILL.md
---
name: maps
description: "Show areas, points and data fields on a web map with MapLibre and free tiles first, or Mapbox GL when a project already uses it. Covers CAP alert areas to GeoJSON, data-driven styling, performance and token safety. Use for any map on a page, an app or an image."
---

# maps

A map shows where a fact applies. It never adds an area, a time or a severity that the source
does not state. The page must stay complete without the map.

## Stack

- **Default: MapLibre GL JS** (BSD-3-Clause) with free tiles and no key: OpenFreeMap styles, or
  one self-hosted Protomaps PMTiles file. Pin the version (`maplibre-gl@<x.y.z>`).
- **Mapbox GL JS** only where the project already uses it. Use only a public `pk.` token,
  restricted to the site's URLs. Write it into the page at deploy time. The committed file stays
  empty. Never put an `sk.` token in a page. With no token, the page says so and shows the list.
- Never add a paid tile service without the owner's approval.
- Always show the attribution: "© OpenStreetMap contributors" and the tile provider.

## CAP 1.2 areas to GeoJSON

1. **Polygon.** CAP writes `lat,lon`. GeoJSON writes `[lon, lat]`. Swap each pair. Check one
   point by hand. A swapped polygon draws in the ocean.
2. **Close the ring.** The first and the last point are equal.
3. **Circle.** CAP writes `lat,lon radius` in km. Make a 64-point polygon. Keep the centre and
   the radius in the properties.
4. **Geocode.** Get the shape from the official source (for Brazil, the IBGE malhas API) and
   cache it. Never draw a guessed shape.
5. **No area.** Draw no shape. Show the area text.

## Style

- Colour by severity or by the data value, with one fixed palette for all channels.
- Fill at 30% opacity with a 2 px outline, so the base map stays readable.
- Put the value in text too: a label and a legend. Colour is never the only signal.
- Fit the view to the data bounds, with padding. Never zoom past the precision of the source.
- A field that is estimated between measured points says so in the legend.

## Performance

- Use GeoJSON sources and layers for many features. Use DOM markers only for a few points that
  need focus and an `aria-label`.
- Start the map after the page's text renders. Load a layer only when the visitor selects it.
- Remove sources, layers and listeners when a view closes.
- `prefers-reduced-motion` stops animated layers.

## Check before a PR

1. One real record from each source draws in the correct place.
2. The attribution shows.
3. No request goes to a paid service (examine the network tab).
4. The page works without the map.

Wersje

RepozytoriumWynikLicencja
Ta strona · piabrota/skills90MPL-2.0
mgifford/accessibility-skills95AGPL-3.0

Migawka bazy z 13.11.2026 · wersja paczki 4f49198a6141 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 1 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100kx-offline-map
    Generuje mapy OfflineMap (MapLibre, MapTiler) w KX Dashboards: punkty, okręgi, linie, heatmapy, animowane okręgi i nakładki GeoJSON, jako domyślny typ mapy.
  • 100maplibre-mapbox-migration
    Prowadzi migrację z Mapbox GL JS do MapLibre GL JS: zmiana pakietów i importów, usunięcie tokena, wybór źródeł kafelków i odpowiedniki wtyczek.
  • 100maplibre-tile-sources
    Pomaga wybrać formę danych dla MapLibre GL JS: GeoJSON z pliku albo kafelki wektorowe lub rastrowe, z progami liczby obiektów i rozmiaru pliku.
  • 100map
    Wyświetla dane GeoJSON, na przykład wyniki wyszukiwania lub trasę, na mapie serwowanej przez kontener getmapstack pod adresem localhost:4326.
  • 100geojson-mapbox-spatial-analysis
    Wykonuje w przeglądarce analizę przestrzenną i przetwarzanie GeoJSON z Turf.js (bufory, otoczki wypukłe, Voronoi, centroidy) oraz stylowanie kafelków wektorowych w Mapbox GL JS i MapLibre.
  • 100maplibre-gl-js
    Buduje wektorowe mapy internetowe w maplibre-gl 6.17.0: źródła, warstwy, teren, niebo i PMTiles, oraz naprawia typowe błędy ładowania.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.