Gallery / Maps & spatial

sf

Pump names on measured boxes

Thirteen Soho neighbourhoods with each pump name on a measured box. The box keeps the name readable over a coloured fill.

Pump names on measured boxes

Source

Svelte, builder, JSON

<script lang="ts">
  import {
    CoordFixed,
    GeomSf,
    GeomSfLabel,
    GGPlot,
    GuideNone,
    Inspect,
    Labs,
    ThemeClassic,
  } from "@ggts-sh/svelte";

  import { pumpNeighbourhoods } from "./data.js";
</script>

<GGPlot
  data={pumpNeighbourhoods}
  aes={{ fill: "pump", label: "pump" }}
  width={640}
  height={400}
>
  <GeomSf alpha={0.75} linewidth={0.8} />
  <GeomSfLabel padding={3} radius={2} size={11} />
  <CoordFixed />
  <ThemeClassic />
  <GuideNone channel="fill" />
  <Labs
    title="Pump names on measured boxes"
    subtitle="Each label sits on a padded box so it stays readable over a busy fill"
  />
  <Inspect mode="exact" pin />
</GGPlot>

Meta

Details

Family
Maps & spatial
Source
sf/boxed-labels
Rendering
SVG
Techniques

sf · sf_label · label · box · geojson · centroid · map