Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计通过

leaflet-mapping传单映射

Agent Skill

leaflet-mapping 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,699

周安装

73

GitHub Stars

52

下载量

596
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:leaflet-mapping(传单映射)
来源仓库:https://github.com/zenobi-us/dotfiles
仓库路径:skills/leaflet-mapping
安装命令:
npx skills add https://github.com/zenobi-us/dotfiles --skill leaflet-mapping
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/zenobi-us/dotfiles --skill leaflet-mapping

简介

用于查找、检索和筛选相关信息,支持基于关键词或任务场景定位结果。

  • 适用于快速获取候选信息,提升 Agent 在复杂查询中的效率。
  • 可通过来源仓库和 README 进一步核验具体用法和功能边界。
  • 安装前建议确认权限范围及是否触发联网或文件读写操作。
  • leaflet-mapping 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Obsidian Leaflet Mapping

Overview

The Obsidian Leaflet plugin enables interactive maps using LeafletJS without writing JavaScript. Maps are defined in code blocks with YAML parameters and can display real-world locations (OpenStreetMap), custom images (fantasy maps, floor plans), or both layered together. Core principle: Maps are defined declaratively in markdown code blocks. The plugin handles all JavaScript - you just configure parameters. Plugin: https://github.com/javalent/obsidian-leaflet

Prerequisites

Required:

  • Obsidian Leaflet plugin (Community Plugins → Search "Leaflet") Optional (enables advanced features):
  • Dataview plugin - REQUIRED for markerTag, filterTag, linksTo, linksFrom features
  • Basic understanding of YAML syntax for code blocks
  • For real-world maps: coordinates from Google Maps, OpenStreetMap, or GPS devices
  • For image maps: image file in vault, known reference measurements for scale

Quick Start: Complete Working Example

Goal: Create a map showing all notes tagged #visited Step 1: Install plugins

  1. Settings → Community Plugins → Browse
  2. Search "Leaflet" → Install → Enable
  3. Search "Dataview" → Install → Enable (REQUIRED for tag-based markers)
  4. Restart Obsidian (recommended after installing plugins) Step 2: Create a test note Create New York.md:
---
location: [40.7128, -74.0060]
---
# New York
My trip notes...

Step 3: Create the map Create Travel Map.md:

id: my-travels markerTag: #visited height: 500px

Expected result: Map displays with one marker. Click marker → opens New York note. If markers don't appear: See troubleshooting checklist below.

When to Use

Use this skill when:

  • Creating location-based navigation in vaults (world maps, city maps, building layouts)
  • Visualizing geographic data from notes (locations with frontmatter)
  • Displaying custom image maps with markers (RPG campaigns, story locations)
  • Tracking routes with GPX files or GeoJSON
  • Building interactive dashboards with spatial data Don't use for:
  • Simple image display (use standard markdown)
  • Complex GIS analysis (use dedicated GIS tools)
  • Real-time map editing (markers are saved to plugin data)

Quick Reference

Basic Map Structure

\`\`\`leaflet
id: unique-map-id              # REQUIRED - any unique string
image: [[ImageFile.jpg]]       # Image map (omit for real-world map)
lat: 50                        # Initial latitude (center point)
long: 50                       # Initial longitude (center point)
height: 500px                  # Map container height
width: 100%                    # Map container width
minZoom: 1                     # Minimum zoom level
maxZoom: 10                    # Maximum zoom level
defaultZoom: 5                 # Initial zoom level
\`\`\`

Map Types

TypeParametersUse Case
Real-World MapOmit image parameterOpenStreetMap, city maps, GPS data
Image Mapimage: [[File.jpg]]Fantasy maps, floor plans, custom artwork
Multi-Layer Imageimage: [[[Layer1]], [[Layer2]]]Maps with toggleable overlays
Custom Tile Server`tileServer: <url>\<alias>`Alternative map styles (Dark, Satellite)

Creating Markers

MethodSyntaxEditableUse Case
Right-click mapInteractive UIYesManual marker placement
Code blockmarker: type,lat,long,link,descNoFixed markers in documentation
From note frontmattermarkerFile: [[Note]]NoSingle note as marker
From foldermarkerFolder: Path/To/FolderNoAll notes in folder
From tagsmarkerTag: #locationNoAll notes with tag (Dataview required)
From linkslinksTo: [[Note]]NoNotes linking to/from (Dataview required)

Real-World Maps

Default tile server is OpenStreetMap. Add custom tile servers for different styles:

\`\`\`leaflet
id: city-map
tileServer: https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png|Dark
tileServer: https://tiles.wmflabs.org/hillshading/{z}/{x}/{y}.png|Hills
osmLayer: false                # Turn off default OpenStreetMap layer
\`\`\`

Tile overlays (instead of full layer replacement):

tileOverlay: https://tiles.example.com/{z}/{x}/{y}.png|Overlay Name|on

Append |on to enable overlay by default.

Image Maps

Critical First Step: Set Bounds

Before adding markers, define bounds to prevent coordinate confusion:

\`\`\`leaflet
id: fantasy-map
image: [[WorldMap.jpg]]
bounds:
  - [0, 0]           # Top-left corner
  - [100, 100]       # Bottom-right corner
\`\`\`

Without bounds, the image stretches to fit arbitrary coordinates. With bounds, latitude/longitude map predictably to image pixels. Common bound strategies:

  • [0,0] to [100,100] - Percentage-based (lat/long are percentages)
  • [0,0] to [width,height] - Pixel-based (match image dimensions)
  • Custom coordinate system matching your source material

Multi-Layer Image Maps

Stack multiple images with independent marker sets:

\`\`\`leaflet
id: layered-map
image:
  - [[BaseMap.jpg|Base Layer]]
  - [[Roads.png|Roads]]
  - [[Buildings.png|Buildings]]
\`\`\`

Layer control box (top-right) toggles layers. Markers saved per-layer.

Zoom Levels on Image Maps

Counter-intuitive behavior: Higher maxZoom makes map START farther away. Why: Image is placed at [0,0] and stretched to fit. Zoom levels control the *underlying map*, not the image scale. Solution: Set bounds first, then adjust zoom to taste.

bounds: [[0,0], [100,100]]
minZoom: 1
maxZoom: 6
defaultZoom: 3
zoomDelta: 0.5          # Finer zoom control

Markers from Notes

Marker behavior: Clicking a linked marker opens the note (Ctrl/Cmd-click for new pane). Markers automatically link to their source note when created via frontmatter.

Finding Coordinates

Real-world maps:

  • Google Maps: Right-click location → First line shows coordinates
  • OpenStreetMap: Share button → "Geo URI" contains coordinates
  • GPS device: Export waypoint coordinates Image maps:
  • Use bounds: [[0,0], [100,100]] for percentage system
  • Right-click map after bounds set → coordinates shown on click
  • Trial-and-error: Place marker, adjust coordinates in frontmatter

Note Frontmatter Format

---
location: [lat, long]           # REQUIRED for automatic markers (array format only)
mapmarker: custom-icon          # Optional: marker type from settings
mapzoom: [minZoom, maxZoom]     # Optional: visibility breakpoints
mapmarkers:                     # Optional: additional markers
  - [type, [lat, long], "Description", minZoom, maxZoom]
  - [type, [lat, long], "Another marker"]
---

Coordinate format: Must be array [lat, long]. Strings like "40.7128, -74.0060" will NOT work.

Marker Methods

Single note:

markerFile: [[LocationNote]]

Folder (all notes):

markerFolder: Locations/Cities
markerFolder: Locations/Cities/    # Limit to top-level only (one slash)

By tags (⚠️ REQUIRES DATAVIEW PLUGIN):

markerTag: #location               # Notes with this tag
markerTag: [#city, #visited]       # Notes with BOTH tags
markerTag:
  - #location                      # Notes with #location OR
  - [#city, #capital]              # Notes with both #city AND #capital

For OR logic: Use separate markerTag lines. For AND logic: Use array [#tag1, #tag2]. Filter results:

markerFolder: Locations
filterTag: #important              # Only show important locations

From link relationships (⚠️ REQUIRES DATAVIEW PLUGIN):

linksTo: [[MainCity]]              # All notes linking to MainCity
linksFrom: [[TravelLog]]           # All notes linked from TravelLog

Multiple files: linksTo: [[[File1]], [[File2]]]

Custom Marker Types

Define in plugin settings or markers.json in same directory:

[
  {
    "type": "city",
    "icon": "building",
    "color": "#FF0000",
    "layer": true
  },
  {
    "type": "dungeon",
    "icon": "dungeon",
    "color": "#8B4513",
    "layer": true
  }
]

Then use in frontmatter: mapmarker: city

Overlays

Circular overlays for areas of effect, regions, etc.

Interactive Creation

Shift + Right-click → drag → click to set radius

Code Block Definition

overlay: [color, [lat, long], radius unit, "description"]

Examples:

overlay: [blue, [32, -89], 25 mi, 'Capital region']
overlay:
  - ['rgb(255,0,0)', [50, 50], 10 km, 'Danger zone']
  - ['#00FF00', [60, 60], 500 ft, 'Safe area']

Note: Overlays draw in order. Smaller overlays behind larger ones become non-interactive.

Overlays from Note Frontmatter

---
location: [50, 50]
mapoverlay: [blue, [50, 50], 25 km, "Influence zone"]
---

Or auto-generate from distance tag:

\`\`\`leaflet
overlayTag: influence
overlayColor: rgba(0,100,255,0.3)
\`\`\`

Note frontmatter: influence: 50 km

GeoJSON and GPX

GeoJSON

geojson: [[File.geojson]]|Optional Alias
geojson:
  - [[Routes.geojson]]
  - [[Regions.geojson]]|Regions|[[LinkedNote]]
geojsonColor: #FF0000            # Default color

GeoJSON features can include:

  • title, description, or name → tooltip
  • MapBox SimpleStyle properties → styling
  • Drawn in order specified (layer order matters)

GPX (GPS tracks)

gpx: [[Track.gpx]]
gpx:
  - [[Hike1.gpx]]
  - [[Hike2.gpx]]
gpxColor: #00FF00
gpxMarkers:
  start: start-marker-type       # From plugin settings
  waypoint: waypoint-type

GPX files show:

  • Route line (colored by speed/elevation/heartrate if data present)
  • Optional start/end/waypoint markers
  • Interactive datapoint display (click track)

Common Patterns

Campaign Map with Location Notes

\`\`\`leaflet
id: campaign-world
image: [[WorldMap.jpg]]
bounds: [[0,0], [100,100]]
markerFolder: Locations/Cities
markerFolder: Locations/Dungeons
markerTag: #location
filterTag: #visited
defaultZoom: 3
\`\`\`

Travel Dashboard with GPX

\`\`\`leaflet
id: travel-routes
lat: 40
long: -100
gpxFolder: Travel/2024
gpxColor: #FF6600
gpxMarkers:
  start: trip-start
  waypoint: stop
\`\`\`

Multi-Layer Fantasy Map

\`\`\`leaflet
id: kingdom-map
image:
  - [[Base.jpg|Terrain]]
  - [[Political.png|Borders]]
  - [[Trade.png|Routes]]
bounds: [[0,0], [1000,1000]]
markerTag: #city
overlayTag: territory
overlayColor: rgba(100,100,255,0.2)
\`\`\`

Common Mistakes

Problem: Markers appear in wrong locations on image maps

Cause: No bounds defined. Without bounds, Leaflet uses arbitrary coordinate space and your image stretches unpredictably. Why this happens: Image maps overlay images onto Leaflet's default coordinate system. Without explicit bounds, the plugin has no way to map your coordinates (e.g., [50, 50]) to specific pixels on your image. Fix:

  1. Set bounds FIRST before placing any markers:
bounds: [[0,0], [100,100]]
  1. Delete existing markers (they're in wrong coordinate system)
  2. Place markers again - they'll now appear where you click Finding correct coordinates on image: After setting bounds, Shift+click map to see coordinates, use those in frontmatter.

Problem: Can't zoom in enough / Map starts too far away

Cause: Image maps: zoom controls underlying map, not image scale Fix:

  1. Set bounds to match coordinate system
  2. Adjust maxZoom (lower number = closer default view)
  3. Use zoomDelta: 0.5 for finer control

Problem: Markers from notes not appearing

Quick diagnostic:

  1. Open note with location → does frontmatter show location: [40.7128, -74.0060]? (array format)
  2. Using markerTag/filterTag/linksTo/linksFrom? → Is Dataview plugin installed AND enabled?
  3. Try restarting Obsidian (plugins sometimes need restart to activate) Full checklist:
  • Note has location: [lat, long] in frontmatter (exact format - array only, not string)
  • Tags work for both YAML (tags: visited) and inline (#visited in note body)
  • Coordinates are within map bounds (check min/max lat/long)
  • Using markerTag, filterTag, linksTo, or linksFrom? Dataview plugin must be installed and enabled (hard dependency)
  • Verify Dataview works: Create a note with dataview code block to confirm plugin active
  • Using filterTag? Check note has ALL required tags
  • Marker zoom breakpoints (mapzoom) within map's minZoom/maxZoom?
  • For real-world maps: valid lat/long (lat: -90 to 90, long: -180 to 180)
  • For image maps: coordinates match your bounds system
  • Map doesn't specify lat/long/defaultZoom? Default centers on [50% world map]. Add showAllMarkers: true to auto-fit all markers.

Problem: GeoJSON/GPX files not loading

Causes:

  • File path incorrect (use wikilink [[file.geojson]] or relative path)
  • Large files slow rendering (check console for errors)
  • JSON syntax errors in GeoJSON Fix: Validate GeoJSON at https://geojsonlint.com/

Problem: Overlays not interactive / Markers hidden under overlay

Cause: Drawing order matters. Overlays and markers drawn later appear on top. Fix:

  • Overlays obscuring other overlays: Reorder in code block (larger overlays last)
  • Overlays obscuring markers: Use semi-transparent colors rgba(255,0,0,0.3) or reduce overlay radius
  • Markers below overlay: Markers from markerTag/markerFolder draw AFTER overlays in code block

Problem: Custom tile server not working

Checklist:

  • URL contains {z}, {x}, {y} placeholders
  • Server allows public access (no API key required)
  • Using tileOverlay instead of tileServer if layering over base map
  • Check browser console for CORS or 404 errors

Distances and Measurements

Display distance between two points:

  • Shift/Alt + click location 1
  • Shift/Alt + click location 2
  • Distance appears in bottom-left control box Scale and units:
unit: miles               # Display unit
scale: 1.5               # Scale factor for image maps

For image maps, measure a known distance on your image, calculate scale: scale = real_distance / measured_pixel_distance

Advanced Features

Initial View from Note

coordinates: [[CityNote]]        # Note with location frontmatter
zoomTag: viewDistance           # Read zoom from note's frontmatter

CityNote frontmatter:

location: [40, -100]
viewDistance: 50 miles

Marker Zoom Breakpoints

Show/hide markers at zoom levels (prevent clutter):

mapzoom: [3, 7]          # Only visible between zoom 3-7

Or per-marker in code block:

marker: city,40,-100,[[Note]],"Description",3,7

Draw Mode

draw: true               # Enable drawing tools
drawColor: #FF0000       # Default shape color

Right-click drawn shapes to edit/delete. Shapes saved to map instance.

Dark Mode

darkMode: true           # CSS filter inversion

Customize in CSS snippet targeting .leaflet-container.dark-mode

Real-World Impact

Use cases from community:

  • TTRPG campaigns: World maps with 100+ location notes, auto-updating as players discover areas
  • Research: GeoJSON datasets visualized with linked analysis notes
  • Travel journals: GPX tracks from Apple Health + journal entries as markers
  • Urban planning: Building layouts with image overlays for different floors
  • Story writing: Character location tracking across plot timeline Performance notes:
  • 50+ markers: Minimal impact
  • 200+ markers: Noticeable load time
  • Large GeoJSON/GPX: Consider splitting files
  • Multiple maps per note: Works fine, independent instances

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

27.8%
按下载量换算166

OpenCode

23.05%
按下载量换算137

Antigravity

17.14%
按下载量换算102

Gemini CLI

12.32%
按下载量换算73

trae

9.31%
按下载量换算55

codebuddy

3.5%
按下载量换算21

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills