Token导航 LogoToken导航TokenDH.com
开发external-servicegithub未标认证来源可访问许可证需确认审计提醒

syncfusion-react-mapssyncfusion React maps 开发

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

1,830

周安装

77

GitHub Stars

1

下载量

641
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/syncfusion/react-ui-components-skills --skill syncfusion-react-maps

简介

用于辅助 React 前端页面、组件、样式和交互逻辑的开发与维护。

  • 适合生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。
  • 使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。
  • 通过 GitHub 安装,支持 Codex、Claude、Cursor、Gemini CLI 等宿主环境。
  • 需确保项目已集成 Syncfusion React 组件库,否则可能无法正常运行相关功能。

SKILL.md

Implementing Syncfusion React Maps

A comprehensive skill for implementing the Syncfusion React Maps component to visualize geographical data with rich interactivity, multiple layers, markers, bubbles, legends, and map provider integration.

When to Use This Skill

Use this skill when you need to:

  • Display geographical data on interactive maps
  • Visualize location-based information with markers, bubbles, or data labels
  • Create choropleth maps with color-coded regions based on data values
  • Integrate map providers like Bing Maps, OpenStreetMap, or Azure Maps
  • Render custom shapes from GeoJSON data files
  • Build multi-layer maps with overlays and sublayers
  • Add navigation lines to show routes or connections between locations
  • Implement zooming and panning for map exploration
  • Display statistical data on geographical regions
  • Create interactive legends for data interpretation
  • Support multiple projections (Mercator, Miller, Eckert, etc.)
  • Handle user interactions like tooltips, selection, and highlighting

Component Overview

The Syncfusion React Maps component is a powerful data visualization tool that renders geographical data using Scalable Vector Graphics (SVG). It supports:

  • Any number of layers and sublayers for complex visualizations
  • GeoJSON data binding for custom shape rendering
  • Map providers (Bing, OpenStreetMap, Azure) as base layers
  • 6 types of projections for different map representations
  • Visual elements: Markers, Bubbles, Navigation Lines, Annotations, Data Labels, Legends
  • Interactive features: Zooming, Panning, Tooltips, Selection, Highlighting
  • Accessibility: WCAG 2.1 compliant with keyboard navigation
  • Globalization: RTL support, internationalization, localization

Key Capabilities

Data Visualization Elements

  • Markers: Pin locations with custom shapes, templates, and clustering
  • Bubbles: Display data magnitude with size-based bubbles
  • Data Labels: Show information directly on map shapes
  • Color Mapping: Apply colors based on data values (equal, range, desaturation)
  • Navigation Lines: Draw connections between locations with curves and arrows
  • Legends: Provide visual keys for data interpretation

Layer Architecture

  • Main Layer: Base map from GeoJSON or map provider
  • Sublayers: Overlay additional shapes on top of main layer
  • Multi-layer Support: Stack multiple layers for rich visualizations

Map Providers

  • Bing Maps: Satellite, aerial, and road views
  • OpenStreetMap: Free tile layer provider
  • Azure Maps: Microsoft's map service
  • Hybrid Approach: Combine GeoJSON shapes with provider tiles

User Interactions

  • Zooming: Mouse wheel, double-click, pinch, toolbar controls
  • Panning: Drag to explore different regions
  • Tooltips: Show data on hover
  • Selection: Highlight shapes on click
  • Reset: Return to initial view

Documentation and Navigation Guide

API Reference

📄 Read: references/api-reference.md

  • Complete MapsComponent properties reference
  • All available methods with examples
  • Comprehensive events documentation
  • Layer, marker, bubble, and data label settings
  • Legend, zoom, and tooltip configuration
  • Quick reference code examples
  • Type definitions and parameters

Getting Started

📄 Read: references/getting-started.md

  • Installation and package dependencies
  • Basic Maps component implementation
  • GeoJSON data structure and binding
  • CSS theme imports
  • Module injection pattern (feature-based)
  • First world map example
  • Data source binding with shapeDataPath and shapePropertyPath

Layers and Structure

📄 Read: references/layers-and-sublayers.md

  • Understanding layer architecture
  • Main layer vs sublayer differences
  • Creating multi-layer maps
  • Layer types and stacking order
  • Layer-specific settings and configuration
  • When to use multiple layers

Markers

📄 Read: references/markers.md

  • Adding markers to pinpoint locations
  • Marker data source structure (latitude, longitude)
  • Marker shapes and custom templates
  • Marker clustering for dense data
  • Dynamic marker updates
  • Interactive markers with click events
  • Marker tooltips and labels

Data Visualization Elements

📄 Read: references/data-visualization.md

  • Bubble visualization for data magnitude
  • Configuring bubble size and colors
  • Data label setup and formatting
  • Smart label modes (trim, hide, none)
  • Label templates for custom content
  • Combining bubbles with data labels
  • Best practices for visual hierarchy

Legend

📄 Read: references/legend.md

  • Enabling and configuring legends
  • Positioning strategies (absolute, dock)
  • Legend alignment options (near, center, far)
  • Interactive legends
  • Legend modes (default, interactive)
  • Customizing legend appearance
  • Syncing legends with color mapping

Color Mapping

📄 Read: references/color-mapping.md

  • Color mapping types (equal, range, desaturation)
  • Applying colors based on data values
  • Setting up colorValuePath
  • Creating choropleth maps
  • Multiple color mapping rules
  • Custom color schemes
  • Visual data representation strategies

Navigation Lines

📄 Read: references/navigation-lines.md

  • Creating lines between locations
  • Line styling (width, color, dash array)
  • Curved lines and angles
  • Arrow indicators for direction
  • Use cases (routes, connections, flows)
  • Animation effects on lines

Map Providers

📄 Read: references/map-providers.md

  • Overview of supported providers
  • When to use GeoJSON vs map providers
  • Bing Maps setup and API keys
  • OpenStreetMap integration (free)
  • Azure Maps configuration
  • Tile layer types (satellite, aerial, road)
  • Hybrid approaches (GeoJSON overlays on provider tiles)

User Interactions

📄 Read: references/user-interactions.md

  • Enabling and configuring zooming
  • Zoom factor and toolbar controls
  • Panning functionality
  • Tooltip configuration and templates
  • Selection and highlighting shapes
  • Mouse wheel and double-click zoom
  • Pinch zoom for touch devices
  • Reset to initial view

Annotations and Polygons

📄 Read: references/annotations-polygon.md

  • Adding custom annotations to maps
  • Polygon rendering for custom shapes
  • Positioning and alignment
  • Interactive annotations
  • Use cases for overlays

Customization

  • Map projections (Mercator, Miller, Eckert, Winkel Tripel, Aitoff, Equirectangular)
  • Title and subtitle configuration
  • Border and background styling
  • Margin and padding adjustments
  • Custom CSS classes
  • Theme integration
  • Responsive design patterns

Advanced Features

📄 Read: references/advanced-features.md

  • Internationalization (i18n)
  • Localization (l10n)
  • Accessibility (WCAG compliance, keyboard navigation)
  • State persistence across sessions
  • Printing and export functionality
  • Event handling patterns
  • Accessing component methods via ref
  • Performance optimization techniques
  • Migration guide from EJ1 to EJ2

Quick Start Example

import * as React from 'react';
import { MapsComponent, LayersDirective, LayerDirective, Inject, Legend } from '@syncfusion/ej2-react-maps';
import { world_map } from './world-map'; // GeoJSON data

function MapExample() {
  const data = [
    { Country: 'United States', Population: 331000000, Membership: 'Permanent' },
    { Country: 'Russia', Population: 145900000, Membership: 'Permanent' },
    { Country: 'China', Population: 1439000000, Membership: 'Permanent' },
    { Country: 'India', Population: 1380000000, Membership: 'Non-Permanent' },
    { Country: 'Brazil', Population: 212500000, Membership: 'Non-Permanent' }
  ];

  return (
    <MapsComponent
      titleSettings={{ text: 'World Map with Country Membership' }}
      legendSettings={{ visible: true }}
    >
      <Inject services={[Legend]} />
      <LayersDirective>
        <LayerDirective
          shapeData={world_map}
          shapeDataPath='Country'
          shapePropertyPath='name'
          dataSource={data}
          shapeSettings={{
            colorValuePath: 'Membership',
            colorMapping: [
              { value: 'Permanent', color: '#D84444' },
              { value: 'Non-Permanent', color: '#316DB5' }
            ]
          }}
        />
      </LayersDirective>
    </MapsComponent>
  );
}

export default MapExample;

Module Injection Guide

Maps features are modular. Inject only the modules you need:

import {
  MapsComponent,
  Inject,
  Legend,        // For legends
  DataLabel,     // For data labels
  Marker,        // For markers
  Bubble,        // For bubbles
  MapsTooltip,   // For tooltips
  Zoom,          // For zooming and panning
  Highlight,     // For highlighting shapes
  Selection,     // For selecting shapes
  NavigationLine,// For navigation lines
  Annotations,   // For annotations
  Polygon        // For polygons
} from '@syncfusion/ej2-react-maps';

<MapsComponent>
  <Inject services={[Legend, Marker, MapsTooltip, Zoom]} />
  {/* Your layers */}
</MapsComponent>

Only inject modules for features you're using to minimize bundle size.

Common Use Cases

Choropleth Map (Color-Coded Regions)

Goal: Display statistical data with color-coded countries/regions

Approach:

  1. Bind data source with dataSource, shapeDataPath, shapePropertyPath
  2. Configure shapeSettings.colorValuePath to specify data field
  3. Set up colorMapping with value-color pairs
  4. Add Legend for interpretation

Example: Population density map, election results, COVID-19 statistics


Location Markers Map

Goal: Show specific locations with custom markers

Approach:

  1. Add MarkersDirective inside LayerDirective
  2. Provide marker data with latitude/longitude
  3. Customize marker shapes, sizes, and templates
  4. Add tooltips for marker information

Example: Store locator, branch offices, tourist attractions


Multi-Layer Overlay

Goal: Highlight specific regions on a base map

Approach:

  1. First layer: Base map (e.g., entire country)
  2. Additional layers with type="SubLayer": Highlighted regions
  3. Style sublayers distinctly (different colors, borders)
  4. Control layer visibility and order

Example: State highlights on country map, sales regions


Route Visualization

Goal: Show connections or routes between locations

Approach:

  1. Add markers for start/end points
  2. Use NavigationLineDirective to draw lines
  3. Configure line curves, arrows, and styling
  4. Optionally animate lines

Example: Flight routes, shipping lanes, migration patterns


Map Provider Integration

Goal: Use real-world satellite/street map as base

Approach:

  1. Configure layer with urlTemplate for provider
  2. Set up API keys (Bing, Azure) if required
  3. Overlay GeoJSON shapes as sublayers if needed
  4. Add markers and labels on top

Example: Real estate map, delivery tracking, ride-sharing app

Decision Trees

Should I Use GeoJSON or Map Provider?

Use GeoJSON when:

  • You need custom shapes or boundaries
  • Data is region/country-based (choropleth maps)
  • No real-world street-level detail needed
  • Offline capability required
  • Full control over styling and data binding

Use Map Provider when:

  • Need real-world satellite/aerial imagery
  • Street-level detail required
  • Real-time map updates desired
  • Users expect familiar map interface (like Google Maps)

Use Both (Hybrid) when:

  • Need real-world base with custom shape overlays
  • Combining statistical regions with street context

Which Color Mapping Type?

Equal Color Mapping:

  • Use when data has discrete categories (e.g., Membership: Permanent/Non-Permanent)
  • Each unique value gets a specific color

Range Color Mapping:

  • Use when data is numeric and continuous (e.g., Population: 0-1M, 1M-10M, 10M+)
  • Values within ranges get assigned colors

Desaturation Color Mapping:

  • Use for gradient effects based on numeric values
  • Single color with varying saturation levels

How Many Layers Should I Use?

Single Layer:

  • Simple visualizations with one data dimension
  • Basic country/region maps
  • When all data fits one layer

Multiple Layers:

  • Highlighting specific regions on base map
  • Combining different data sources
  • Creating visual depth with overlays
  • Showing borders, rivers, cities separately

Key Props Reference

MapsComponent

  • titleSettings: Configure title and subtitle
  • legendSettings: Legend visibility, position, alignment
  • zoomSettings: Enable zooming, set initial zoom factor
  • layers: Array of layer configurations

LayerDirective

  • shapeData: GeoJSON data for shapes
  • dataSource: Data to bind to shapes
  • shapeDataPath: Field in dataSource matching shapes
  • shapePropertyPath: Field in GeoJSON matching dataSource
  • shapeSettings: Fill, border, color mapping
  • type: "Layer" (main) or "SubLayer" (overlay)
  • markerSettings: Marker configurations
  • bubbleSettings: Bubble visualizations
  • dataLabelSettings: Label configurations
  • tooltipSettings: Tooltip customization
  • navigationLineSettings: Line visualizations

Common Patterns

  • Module Injection: Only inject needed services to reduce bundle size
  • Data Binding: Use shapeDataPath + shapePropertyPath for automatic matching
  • Progressive Enhancement: Start with basic map, add features incrementally
  • Responsive Design: Maps auto-resize, but test on different viewports

Troubleshooting Quick Checks

Map not displaying:

  • Verify GeoJSON data is correctly imported
  • Check console for errors
  • Ensure CSS is imported

Colors not applied:

  • Confirm shapeDataPath matches data field name
  • Verify shapePropertyPath matches GeoJSON property
  • Check colorValuePath points to correct data field

Markers not showing:

  • Inject Marker service
  • Set visible={true} in MarkerDirective
  • Verify latitude/longitude values are valid

Zoom not working:

  • Inject Zoom service
  • Set zoomSettings.enable={true}
  • Check if enablePanning is needed

Legend not appearing:

  • Inject Legend service
  • Set legendSettings.visible={true}
  • Ensure color mapping is configured

Next Steps

  1. Start Simple: Begin with getting-started.md for basic map
  2. Add Data: Follow data-visualization.md for markers/bubbles
  3. Style It: Use color-mapping.md for choropleth effects
  4. Make Interactive: Implement user-interactions.md for zoom/pan
  5. Enhance: Add advanced features as needed

Choose the reference documentation that matches your current implementation phase and specific requirements.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

37.25%
按下载量换算239

Claude

31.39%
按下载量换算201

Cursor

18.27%
按下载量换算117

Gemini CLI

10.41%
按下载量换算67

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills