MapGraticule
Renders graticule lines as an SVG <path> layer
Props
| Parameter | Type | Default | Description |
|---|---|---|---|
config? | GraticuleConfig | — | See usage below |
Use native SVG presentation attrs like stroke directly on MapGraticule lines.
SVG layer order matters. If graticule lines cover the sphere border, render the sphere background first and a second sphere outline last.
Config
Use config to call graticule generator methods before rendering
ts
{
[methodName: string]: Arg | Arg[]
}- Single non-array value:
Arg | [Arg]- pass directly or wrap with an array - Single array value:
[Arg]- must be wrapped with an array - Multiple values:
[Arg1, Arg2, ...]
See available methods in d3-geo graticule docs
Usage
vue
<template>
<MapBase>
<MapSphere fill="#fff" />
<MapFeatures :data="mapData" fill="#f1f5f9" />
<MapGraticule
stroke="#94a3b8"
:config="{
step: [[15, 15]],
precision: 2.5,
}"
/>
<MapSphere stroke="#cbd5e1" />
</MapBase>
</template>