syncfusion-aspnetcore-maps
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseImplementing Syncfusion Maps for ASP.NET Core
为ASP.NET Core实现Syncfusion Maps组件
The Syncfusion Maps component is a powerful tool for visualizing geographical data using Scalable Vector Graphics (SVG). It supports GeoJSON data, multiple layers, map providers (Bing, Azure, OpenStreetMap), and rich interactive features like zooming, panning, tooltips, and selection.
Syncfusion Maps组件是一个强大的工具,可使用可缩放矢量图形(SVG)可视化地理数据。它支持GeoJSON数据、多层级地图、地图提供商(Bing、Azure、OpenStreetMap)以及缩放、平移、提示框和选择等丰富的交互功能。
When to Use This Skill
何时使用此技能
Use the Syncfusion Maps component when you need to:
- Visualize geographical data - Display country, state, or regional data on interactive maps
- Create choropleth maps - Show data distribution using color mapping across regions
- Plot location markers - Display points of interest, offices, stores, or custom locations
- Render bubble maps - Visualize quantitative data with size-based bubbles on geographical locations
- Integrate map providers - Use Bing Maps, Azure Maps, or OpenStreetMap as base layers
- Show custom shapes - Render custom GeoJSON shapes for specific regions or areas
- Build interactive dashboards - Create zoomable, pannable maps with tooltips and selection
- Display navigation routes - Show navigation lines connecting different locations
- Overlay annotations - Add custom HTML/text annotations on maps
- Create multi-layer visualizations - Combine multiple data layers on a single map
在以下场景中可使用Syncfusion Maps组件:
- 可视化地理数据 - 在交互式地图上展示国家、州或区域数据
- 创建分级统计图 - 通过区域间的颜色映射展示数据分布
- 绘制位置标记 - 展示兴趣点、办公室、门店或自定义位置
- 渲染气泡地图 - 在地理位置上通过基于大小的气泡可视化量化数据
- 集成地图提供商 - 使用Bing Maps、Azure Maps或OpenStreetMap作为基础图层
- 展示自定义形状 - 为特定区域或地区渲染自定义GeoJSON形状
- 构建交互式仪表盘 - 创建支持缩放、平移、提示框和选择功能的地图
- 展示导航路线 - 展示连接不同位置的导航线路
- 叠加注释 - 在地图上添加自定义HTML/文本注释
- 创建多层级可视化 - 在单个地图上组合多个数据图层
Component Overview
组件概述
Key Capabilities:
- 📍 Multiple Layers - Support for unlimited layers and sublayers with independent configuration
- 🗺️ GeoJSON Support - Load and render custom geographical shapes
- 🌐 Map Providers - Integration with Bing Maps, Azure Maps, and OpenStreetMap
- 🎨 Color Mapping - Visualize data with equal, range, and desaturation color schemes
- 📌 Markers & Bubbles - Plot locations with customizable markers and size-based bubbles
- 🏷️ Data Labels - Display shape names and data values with smart positioning
- 🎯 Interactivity - Zoom, pan, tooltip, selection, and highlight features
- 📊 Legend - Interactive legends for color mapping, markers, and bubbles
- ✏️ Annotations - Custom HTML overlays at specific coordinates
- 🌍 Projections - Support for 6 map projection types
- 🖨️ Export - Print and export maps to PNG, JPEG, SVG, PDF formats
- ♿ Accessibility - WCAG compliant with keyboard navigation and screen reader support
核心功能:
- 📍 多层级支持 - 支持无限数量的图层和子图层,且各层可独立配置
- 🗺️ GeoJSON支持 - 加载并渲染自定义地理形状
- 🌐 地图提供商集成 - 与Bing Maps、Azure Maps和OpenStreetMap集成
- 🎨 颜色映射 - 使用等值、范围和去饱和配色方案可视化数据
- 📌 标记与气泡 - 使用可自定义的标记和基于大小的气泡标记位置
- 🏷️ 数据标签 - 通过智能定位展示形状名称和数据值
- 🎯 交互功能 - 缩放、平移、提示框、选择和高亮功能
- 📊 图例 - 针对颜色映射、标记和气泡的交互式图例
- ✏️ 注释 - 在特定坐标处添加自定义HTML叠加层
- 🌍 投影类型 - 支持6种地图投影类型
- 🖨️ 导出功能 - 打印并将地图导出为PNG、JPEG、SVG、PDF格式
- ♿ 无障碍支持 - 符合WCAG标准,支持键盘导航和屏幕阅读器
Documentation and Navigation Guide
文档与导航指南
Getting Started and Installation
入门与安装
📄 Read: references/getting-started.md
When user needs to:
- Set up the Maps component for the first time
- Install NuGet packages and configure dependencies
- Add tag helpers and script references
- Create a basic map with GeoJSON data
- Understand the minimal setup requirements
📄 阅读: references/getting-started.md
当你需要以下操作时:
- 首次设置Maps组件
- 安装NuGet包并配置依赖项
- 添加标签助手和脚本引用
- 使用GeoJSON数据创建基础地图
- 了解最小化设置要求
Layers and GeoJSON Data
图层与GeoJSON数据
📄 Read: references/layers-and-geojson.md
When user needs to:
- Understand map layer architecture
- Work with GeoJSON format and custom shapes
- Add multiple layers or sublayers
- Load GeoJSON from files or URLs
- Configure layer visibility and ordering
- Handle layer-specific settings
📄 阅读: references/layers-and-geojson.md
当你需要以下操作时:
- 了解地图图层架构
- 处理GeoJSON格式和自定义形状
- 添加多个图层或子图层
- 从文件或URL加载GeoJSON
- 配置图层可见性和顺序
- 处理图层专属设置
Data Binding and Population
数据绑定与填充
📄 Read: references/data-binding.md
When user needs to:
- Bind data source to map shapes
- Configure ShapeDataPath and ShapePropertyPath
- Match data records to geographical shapes
- Bind data from JSON, databases, or APIs
- Update data dynamically
- Transform data for visualization
📄 阅读: references/data-binding.md
当你需要以下操作时:
- 将数据源绑定到地图形状
- 配置ShapeDataPath和ShapePropertyPath
- 将数据记录与地理形状匹配
- 从JSON、数据库或API绑定数据
- 动态更新数据
- 转换数据以适配可视化需求
Markers
标记
📄 Read: references/markers.md
When user needs to:
- Add location markers to maps
- Use different marker types (Circle, Image, Letter, Template)
- Customize marker appearance (size, color, borders)
- Position markers using latitude/longitude
- Add marker tooltips and events
- Implement marker clustering
- Create custom marker templates
📄 阅读: references/markers.md
当你需要以下操作时:
- 在地图上添加位置标记
- 使用不同的标记类型(圆形、图片、文字、模板)
- 自定义标记外观(大小、颜色、边框)
- 使用经纬度定位标记
- 添加标记提示框和事件
- 实现标记聚类
- 创建自定义标记模板
Bubbles
气泡
📄 Read: references/bubbles.md
When user needs to:
- Create bubble visualizations on maps
- Size bubbles based on data values
- Configure bubble colors and opacity
- Set minimum and maximum bubble radius
- Add bubble tooltips
- Implement multiple bubble sets
- Handle bubble selection
📄 阅读: references/bubbles.md
当你需要以下操作时:
- 在地图上创建气泡可视化效果
- 根据数据值调整气泡大小
- 配置气泡颜色和透明度
- 设置气泡最小和最大半径
- 添加气泡提示框
- 实现多组气泡
- 处理气泡选择
Data Labels
数据标签
📄 Read: references/data-labels.md
When user needs to:
- Display labels on map shapes
- Configure label positioning and alignment
- Use smart label modes (Trim, Hide, None)
- Customize label fonts and styling
- Create template-based labels
- Handle label intersections
- Add labels to markers and bubbles
📄 阅读: references/data-labels.md
当你需要以下操作时:
- 在地图形状上显示标签
- 配置标签定位和对齐方式
- 使用智能标签模式(截断、隐藏、无)
- 自定义标签字体和样式
- 创建基于模板的标签
- 处理标签重叠
- 为标记和气泡添加标签
Color Mapping
颜色映射
📄 Read: references/color-mapping.md
When user needs to:
- Apply colors to shapes based on data
- Configure equal color mapping (value-to-color)
- Set up range color mapping (min-max ranges)
- Use desaturation color mapping (gradient opacity)
- Create choropleth maps
- Define custom color palettes
- Handle accessibility and contrast
📄 阅读: references/color-mapping.md
当你需要以下操作时:
- 根据数据为形状应用颜色
- 配置等值颜色映射(值到颜色)
- 设置范围颜色映射(最小-最大范围)
- 使用去饱和颜色映射(渐变透明度)
- 创建分级统计图
- 定义自定义调色板
- 处理无障碍和对比度需求
Legend
图例
📄 Read: references/legend.md
When user needs to:
- Add legend to maps
- Configure legend positioning and alignment
- Enable interactive legend (toggle, highlight)
- Customize legend shapes and text
- Create legends for color mapping
- Add legends for markers and bubbles
- Implement legend paging for many items
📄 阅读: references/legend.md
当你需要以下操作时:
- 为地图添加图例
- 配置图例定位和对齐方式
- 启用交互式图例(切换、高亮)
- 自定义图例形状和文本
- 为颜色映射创建图例
- 为标记和气泡添加图例
- 为大量图例项实现分页
Annotations
注释
📄 Read: references/annotations.md
When user needs to:
- Add custom HTML content to maps
- Position annotations at specific coordinates
- Create text or template-based annotations
- Style and align annotations
- Handle annotation z-index and layering
- Add dynamic annotations
- Create responsive annotations
📄 阅读: references/annotations.md
当你需要以下操作时:
- 为地图添加自定义HTML内容
- 在特定坐标处定位注释
- 创建基于文本或模板的注释
- 设置注释样式和对齐方式
- 处理注释的层级和分层
- 添加动态注释
- 创建响应式注释
User Interactions
用户交互
📄 Read: references/user-interactions.md
When user needs to:
- Enable zooming (mouse wheel, pinch, toolbar)
- Configure panning features
- Add tooltips with custom templates
- Implement shape selection and multi-selection
- Enable highlight on hover
- Handle click events
- Add navigation lines between locations
- Set zoom levels and constraints
📄 阅读: references/user-interactions.md
当你需要以下操作时:
- 启用缩放(鼠标滚轮、捏合、工具栏)
- 配置平移功能
- 添加带自定义模板的提示框
- 实现形状选择和多选
- 启用悬停高亮
- 处理点击事件
- 添加位置间的导航线路
- 设置缩放级别和限制
Map Providers Integration
地图提供商集成
📄 Read: references/map-providers.md
When user needs to:
- Integrate Bing Maps (Road, Aerial, Hybrid)
- Set up Azure Maps with API keys
- Use OpenStreetMap (OSM) tiles
- Configure custom tile servers
- Combine providers with GeoJSON layers
- Handle provider authentication
- Compare provider features and limitations
📄 阅读: references/map-providers.md
当你需要以下操作时:
- 集成Bing Maps(道路、航拍、混合模式)
- 使用API密钥设置Azure Maps
- 使用OpenStreetMap(OSM)瓦片
- 配置自定义瓦片服务器
- 将提供商与GeoJSON图层结合
- 处理提供商身份验证
- 对比提供商功能和限制
Advanced Features
高级功能
When user needs to:
- Render polygons with custom data
- Add navigation lines with arrows
- Print or export maps to images/PDF
- Implement internationalization (i18n)
- Configure localization (l10n)
- Enable accessibility features
- Implement state persistence
- Use programmatic methods
- Optimize performance
- Migrate from EJ1 to EJ2
当你需要以下操作时:
- 使用自定义数据渲染多边形
- 添加带箭头的导航线路
- 打印或将地图导出为图片/PDF
- 实现国际化(i18n)
- 配置本地化(l10n)
- 启用无障碍功能
- 实现状态持久化
- 使用编程式方法
- 优化性能
- 从EJ1迁移到EJ2
Quick Start Example
快速入门示例
Basic Map with GeoJSON and Color Mapping
带GeoJSON和颜色映射的基础地图
cshtml
@using Newtonsoft.Json
@using Syncfusion.EJ2.Maps
@{
// Load GeoJSON data
string geoJson = System.IO.File.ReadAllText("wwwroot/scripts/MapsData/WorldMap.json");
var worldMapData = JsonConvert.DeserializeObject(geoJson);
// Load data source
string dataJson = System.IO.File.ReadAllText("wwwroot/scripts/MapsData/population.json");
var populationData = JsonConvert.DeserializeObject(dataJson);
// Define color mapping
var colorMapping = new List<MapsColorMapping> {
new MapsColorMapping { From = 0, To = 100000000, Color = "#C6E7F0", Label = "< 100M" },
new MapsColorMapping { From = 100000000, To = 500000000, Color = "#6AB7D6", Label = "100M - 500M" },
new MapsColorMapping { From = 500000000, To = 1500000000, Color = "#1A7FA0", Label = "> 500M" }
};
var propertyPath = new[] { "name" };
}
<ejs-maps id="maps" height="600px">
<e-maps-titlesettings text="World Population by Country">
<e-maps-titlesettings-textstyle size="16px" fontWeight="500"></e-maps-titlesettings-textstyle>
</e-maps-titlesettings>
<e-maps-legendsettings visible="true" position="Bottom"></e-maps-legendsettings>
<e-maps-layers>
<e-maps-layer shapeData="worldMapData"
dataSource="populationData"
shapeDataPath="Country"
shapePropertyPath="propertyPath">
<e-layersettings-shapesettings
fill="#E5E5E5"
colorValuePath="Population"
colorMapping="colorMapping">
</e-layersettings-shapesettings>
<e-layersettings-tooltipsettings visible="true" valuePath="Country">
<e-tooltipsettings-template>
<div style="padding: 8px;">
<strong>${Country}</strong><br/>
Population: ${Population}
</div>
</e-tooltipsettings-template>
</e-layersettings-tooltipsettings>
</e-maps-layer>
</e-maps-layers>
</ejs-maps>cshtml
@using Newtonsoft.Json
@using Syncfusion.EJ2.Maps
@{
// Load GeoJSON data
string geoJson = System.IO.File.ReadAllText("wwwroot/scripts/MapsData/WorldMap.json");
var worldMapData = JsonConvert.DeserializeObject(geoJson);
// Load data source
string dataJson = System.IO.File.ReadAllText("wwwroot/scripts/MapsData/population.json");
var populationData = JsonConvert.DeserializeObject(dataJson);
// Define color mapping
var colorMapping = new List<MapsColorMapping> {
new MapsColorMapping { From = 0, To = 100000000, Color = "#C6E7F0", Label = "< 100M" },
new MapsColorMapping { From = 100000000, To = 500000000, Color = "#6AB7D6", Label = "100M - 500M" },
new MapsColorMapping { From = 500000000, To = 1500000000, Color = "#1A7FA0", Label = "> 500M" }
};
var propertyPath = new[] { "name" };
}
<ejs-maps id="maps" height="600px">
<e-maps-titlesettings text="World Population by Country">
<e-maps-titlesettings-textstyle size="16px" fontWeight="500"></e-maps-titlesettings-textstyle>
</e-maps-titlesettings>
<e-maps-legendsettings visible="true" position="Bottom"></e-maps-legendsettings>
<e-maps-layers>
<e-maps-layer shapeData="worldMapData"
dataSource="populationData"
shapeDataPath="Country"
shapePropertyPath="propertyPath">
<e-layersettings-shapesettings
fill="#E5E5E5"
colorValuePath="Population"
colorMapping="colorMapping">
</e-layersettings-shapesettings>
<e-layersettings-tooltipsettings visible="true" valuePath="Country">
<e-tooltipsettings-template>
<div style="padding: 8px;">
<strong>${Country}</strong><br/>
Population: ${Population}
</div>
</e-tooltipsettings-template>
</e-layersettings-tooltipsettings>
</e-maps-layer>
</e-maps-layers>
</ejs-maps>Map with Markers
带标记的地图
cshtml
@using Newtonsoft.Json
@using Syncfusion.EJ2.Maps
@{
var worldMapData = JsonConvert.DeserializeObject(System.IO.File.ReadAllText("wwwroot/scripts/MapsData/WorldMap.json"));
var cities = new[]
{
new { Name = "New York", Latitude = 40.7128, Longitude = -74.0060, Population = "8.4M" },
new { Name = "Tokyo", Latitude = 35.6762, Longitude = 139.6503, Population = "13.9M" },
new { Name = "London", Latitude = 51.5074, Longitude = -0.1278, Population = "9.0M" },
new { Name = "Sydney", Latitude = -33.8688, Longitude = 151.2093, Population = "5.3M" }
};
}
<ejs-maps id="maps" height="600px">
<e-maps-zoomsettings enable="true" zoomFactor="2"></e-maps-zoomsettings>
<e-maps-layers>
<e-maps-layer shapeData="worldMapData">
<e-layersettings-shapesettings fill="#C3E6ED"></e-layersettings-shapesettings>
<e-layersettings-markersettings>
<e-layersettings-markersetting
visible="true"
dataSource="cities"
shape="Circle"
fill="#FF6347"
height="15"
width="15">
<e-layersettings-markersetting-tooltipsettings
visible="true"
valuePath="Name">
<e-markersetting-tooltipsettings-template>
<div style="padding: 8px;">
<strong>${Name}</strong><br/>
Population: ${Population}
</div>
</e-markersetting-tooltipsettings-template>
</e-layersettings-markersetting-tooltipsettings>
</e-layersettings-markersetting>
</e-layersettings-markersettings>
</e-maps-layer>
</e-maps-layers>
</ejs-maps>cshtml
@using Newtonsoft.Json
@using Syncfusion.EJ2.Maps
@{
var worldMapData = JsonConvert.DeserializeObject(System.IO.File.ReadAllText("wwwroot/scripts/MapsData/WorldMap.json"));
var cities = new[]
{
new { Name = "New York", Latitude = 40.7128, Longitude = -74.0060, Population = "8.4M" },
new { Name = "Tokyo", Latitude = 35.6762, Longitude = 139.6503, Population = "13.9M" },
new { Name = "London", Latitude = 51.5074, Longitude = -0.1278, Population = "9.0M" },
new { Name = "Sydney", Latitude = -33.8688, Longitude = 151.2093, Population = "5.3M" }
};
}
<ejs-maps id="maps" height="600px">
<e-maps-zoomsettings enable="true" zoomFactor="2"></e-maps-zoomsettings>
<e-maps-layers>
<e-maps-layer shapeData="worldMapData">
<e-layersettings-shapesettings fill="#C3E6ED"></e-layersettings-shapesettings>
<e-layersettings-markersettings>
<e-layersettings-markersetting
visible="true"
dataSource="cities"
shape="Circle"
fill="#FF6347"
height="15"
width="15">
<e-layersettings-markersetting-tooltipsettings
visible="true"
valuePath="Name">
<e-markersetting-tooltipsettings-template>
<div style="padding: 8px;">
<strong>${Name}</strong><br/>
Population: ${Population}
</div>
</e-markersetting-tooltipsettings-template>
</e-layersettings-markersetting-tooltipsettings>
</e-layersettings-markersetting>
</e-layersettings-markersettings>
</e-maps-layer>
</e-maps-layers>
</ejs-maps>API Reference
API参考
Maps Class
Maps类
The primary Maps component class with properties, methods, and events for controlling map behavior and appearance.
用于控制地图行为和外观的核心Maps组件类,包含属性、方法和事件。
Core Properties (63 total)
核心属性(共63个)
| Property | Type | Default | Description | API Link |
|---|---|---|---|---|
| AllowImageExport | bool | false | Enables or disables the export to image (PNG, JPEG, SVG) functionality in maps | Learn More |
| AllowPdfExport | bool | false | Enables or disables the export to PDF functionality in maps | Learn More |
| AllowPrint | bool | false | Enables or disables the print functionality in maps | Learn More |
| Annotations | List<MapsAnnotation> | null | Gets or sets the options for customizing the annotations in the maps. Annotations allow custom HTML/text overlays at specific coordinates | Learn More |
| Background | string | null | Gets or sets the background color of the maps container | Learn More |
| BaseLayerIndex | double | 0 | Gets or sets the index of the layer which will be the base layer. Determines which layer is visible in the maps | Learn More |
| Border | MapsBorder | null | Gets or sets the options for customizing the style properties of the maps border (width, color) | Learn More |
| CenterPosition | MapsCenterPosition | null | Gets or sets the center position of the maps using latitude and longitude coordinates | Learn More |
| Description | string | null | Gets or sets the description of the maps for assistive technology and accessibility | Learn More |
| EnablePersistence | bool | false | Enable or disable persisting component's state between page reloads. Maintains zoom level, pan position, etc. | Learn More |
| EnableRtl | bool | false | Enable or disable rendering component in right to left direction for RTL languages | Learn More |
| Format | string | null | Gets or sets the format to apply internationalization for the text in the maps | Learn More |
| Height | string | null | Gets or sets the height in which the maps is to be rendered. Can be percentage or pixel value | Learn More |
| HtmlAttributes | object | null | Allows additional HTML attributes such as title, name, data-*, etc. in key-value pair format | Learn More |
| Layers | List<MapsLayer> | null | Gets or sets the options to customize the layers of the maps. Supports unlimited layers and sublayers | Learn More |
| LegendSettings | MapsLegendSettings | null | Gets or sets the options to customize the legend of the maps (position, alignment, visibility, etc.) | Learn More |
| Locale | string | "en-US" | Overrides the global culture and localization value for this component | Learn More |
| MapsArea | MapsMapsAreaSettings | null | Gets or sets the options to customize the area around the map (background, border) | Learn More |
| Margin | MapsMargin | null | Gets or sets the options to customize the margin of the maps (top, bottom, left, right) | Learn More |
| ProjectionType | ProjectionType | Mercator | Gets or sets the projection type (Mercator, EquirectangularProjection, MercatorProjection, etc.) | Learn More |
| TabIndex | double | 0 | Gets or sets the tab index value for the maps | Learn More |
| Theme | MapsTheme | Material | Gets or sets the theme styles supported for maps (Material, Fabric, HighContrast, BootstrapDark, etc.) | Learn More |
| TitleSettings | MapsTitleSettings | null | Gets or sets the options to customize the title of the maps (text, alignment, font, etc.) | Learn More |
| TooltipDisplayMode | TooltipGesture | MouseMove | Gets or sets the mode in which the tooltip is displayed (MouseMove, Click, DoubleClick) | Learn More |
| UseGroupingSeparator | bool | false | Enables or disables the visibility state of the separator for grouping in formatted numbers | Learn More |
| Width | string | null | Gets or sets the width in which the maps is to be rendered. Can be percentage or pixel value | Learn More |
| ZoomSettings | MapsZoomSettings | null | Gets or sets the options to customize the zooming operations in maps | Learn More |
| 属性 | 类型 | 默认值 | 描述 | API链接 |
|---|---|---|---|---|
| AllowImageExport | bool | false | 启用或禁用地图导出为图片(PNG、JPEG、SVG)的功能 | 了解更多 |
| AllowPdfExport | bool | false | 启用或禁用地图导出为PDF的功能 | 了解更多 |
| AllowPrint | bool | false | 启用或禁用地图打印功能 | 了解更多 |
| Annotations | List<MapsAnnotation> | null | 获取或设置地图注释的自定义选项。注释允许在特定坐标处添加自定义HTML/文本叠加层 | 了解更多 |
| Background | string | null | 获取或设置地图容器的背景颜色 | 了解更多 |
| BaseLayerIndex | double | 0 | 获取或设置作为基础图层的图层索引。决定地图中哪个图层可见 | 了解更多 |
| Border | MapsBorder | null | 获取或设置地图边框的样式属性选项(宽度、颜色) | 了解更多 |
| CenterPosition | MapsCenterPosition | null | 获取或设置使用经纬度坐标的地图中心位置 | 了解更多 |
| Description | string | null | 获取或设置地图的描述信息,用于辅助技术和无障碍支持 | 了解更多 |
| EnablePersistence | bool | false | 启用或禁用页面刷新时保留组件状态。维持缩放级别、平移位置等 | 了解更多 |
| EnableRtl | bool | false | 启用或禁用为RTL语言从右到左渲染组件 | 了解更多 |
| Format | string | null | 获取或设置为地图文本应用国际化的格式 | 了解更多 |
| Height | string | null | 获取或设置地图渲染的高度。可以是百分比或像素值 | 了解更多 |
| HtmlAttributes | object | null | 允许以键值对格式添加额外的HTML属性,如title、name、data-*等 | 了解更多 |
| Layers | List<MapsLayer> | null | 获取或设置地图图层的自定义选项。支持无限数量的图层和子图层 | 了解更多 |
| LegendSettings | MapsLegendSettings | null | 获取或设置地图图例的自定义选项(位置、对齐方式、可见性等) | 了解更多 |
| Locale | string | "en-US" | 覆盖此组件的全局文化和本地化值 | 了解更多 |
| MapsArea | MapsMapsAreaSettings | null | 获取或设置地图周围区域的自定义选项(背景、边框) | 了解更多 |
| Margin | MapsMargin | null | 获取或设置地图边距的自定义选项(上、下、左、右) | 了解更多 |
| ProjectionType | ProjectionType | Mercator | 获取或设置投影类型(Mercator、EquirectangularProjection、MercatorProjection等) | 了解更多 |
| TabIndex | double | 0 | 获取或设置地图的Tab索引值 | 了解更多 |
| Theme | MapsTheme | Material | 获取或设置地图支持的主题样式(Material、Fabric、HighContrast、BootstrapDark等) | 了解更多 |
| TitleSettings | MapsTitleSettings | null | 获取或设置地图标题的自定义选项(文本、对齐方式、字体等) | 了解更多 |
| TooltipDisplayMode | TooltipGesture | MouseMove | 获取或设置提示框的显示模式(MouseMove、Click、DoubleClick) | 了解更多 |
| UseGroupingSeparator | bool | false | 启用或禁用格式化数字中分组分隔符的可见性 | 了解更多 |
| Width | string | null | 获取或设置地图渲染的宽度。可以是百分比或像素值 | 了解更多 |
| ZoomSettings | MapsZoomSettings | null | 获取或设置地图缩放操作的自定义选项 | 了解更多 |
Maps Events (28 total)
Maps事件(共28个)
| Event | Type | Trigger Condition | Description |
|---|---|---|---|
| AnimationComplete | string | null | Triggers after the animation is completed in the maps |
| AnnotationRendering | string | null | Triggers before rendering an annotation in the maps |
| BeforePrint | string | null | Triggers before the print gets started |
| BubbleClick | string | null | Triggers when performing the click operation on the bubble element in maps |
| BubbleMouseMove | string | null | Triggers when hovering the mouse on the bubble element in maps |
| BubbleRendering | string | null | Triggers before the bubble element gets rendered on the map |
| Click | string | null | Triggers when a user clicks on an element in Maps |
| DataLabelRendering | string | null | Triggers before the data-label gets rendered |
| DoubleClick | string | null | Triggers when performing the double click operation on an element in maps |
| ItemHighlight | string | null | Trigger before the shape, bubble or marker gets highlighted |
| ItemSelection | string | null | Triggers before the shape, bubble or marker gets selected |
| LayerRendering | string | null | Triggers before the maps layer gets rendered |
| LegendRendering | string | null | Triggers before the legend gets rendered |
| Load | string | null | Triggers before the maps gets rendered |
| Loaded | string | null | Triggers after the maps gets rendered |
| MarkerClick | string | null | Triggers when clicking on a marker element |
| MarkerClusterClick | string | null | Triggers when clicking the marker cluster in maps |
| MarkerClusterMouseMove | string | null | Triggers when moving the mouse over the marker cluster element |
| MarkerClusterRendering | string | null | Triggers before the maps marker cluster gets rendered |
| MarkerDragEnd | string | null | When the marker has stopped dragging on the map, this event is triggered |
| MarkerDragStart | string | null | When the marker begins to drag on the map, this event is triggered |
| MarkerMouseMove | string | null | Triggers when moving the mouse over the marker element in maps |
| MarkerRendering | string | null | Triggers before the maps marker gets rendered |
| MouseMove | string | null | This event is triggered when the mouse pointer moves over the map |
| Pan | string | null | Triggers before performing the panning operation |
| PanComplete | string | null | This event is triggered after performing the panning action |
| Resize | string | null | Triggers to notify the resize of the maps when the window is resized |
| RightClick | string | null | Triggers when performing the right click operation on an element in maps |
| ShapeHighlight | string | null | Triggers before the shape gets highlighted |
| ShapeRendering | string | null | Triggers before the maps shape gets rendered |
| ShapeSelected | string | null | Triggers when a shape is selected in the maps |
| TooltipRender | string | null | Triggers before the maps tooltip gets rendered |
| TooltipRenderComplete | string | null | Triggers after the maps tooltip gets rendered |
| Zoom | string | null | Triggers before the zoom operations such as zoom in and zoom out |
| ZoomComplete | string | null | This event is triggered after the zooming operation is completed |
| 事件 | 类型 | 触发条件 | 描述 |
|---|---|---|---|
| AnimationComplete | string | null | 地图动画完成后触发 |
| AnnotationRendering | string | null | 地图注释渲染前触发 |
| BeforePrint | string | null | 打印开始前触发 |
| BubbleClick | string | null | 在地图上点击气泡元素时触发 |
| BubbleMouseMove | string | null | 在地图上鼠标悬停在气泡元素上时触发 |
| BubbleRendering | string | null | 地图气泡元素渲染前触发 |
| Click | string | null | 用户点击地图中的元素时触发 |
| DataLabelRendering | string | null | 数据标签渲染前触发 |
| DoubleClick | string | null | 在地图上双击元素时触发 |
| ItemHighlight | string | null | 形状、气泡或标记高亮前触发 |
| ItemSelection | string | null | 形状、气泡或标记选择前触发 |
| LayerRendering | string | null | 地图图层渲染前触发 |
| LegendRendering | string | null | 图例渲染前触发 |
| Load | string | null | 地图渲染前触发 |
| Loaded | string | null | 地图渲染完成后触发 |
| MarkerClick | string | null | 点击标记元素时触发 |
| MarkerClusterClick | string | null | 点击地图中的标记聚类时触发 |
| MarkerClusterMouseMove | string | null | 鼠标悬停在标记聚类元素上时触发 |
| MarkerClusterRendering | string | null | 地图标记聚类渲染前触发 |
| MarkerDragEnd | string | null | 标记在地图上停止拖动时触发 |
| MarkerDragStart | string | null | 标记开始在地图上拖动时触发 |
| MarkerMouseMove | string | null | 鼠标悬停在地图中的标记元素上时触发 |
| MarkerRendering | string | null | 地图标记渲染前触发 |
| MouseMove | string | null | 鼠标指针在地图上移动时触发 |
| Pan | string | null | 执行平移操作前触发 |
| PanComplete | string | null | 执行平移操作后触发 |
| Resize | string | null | 窗口调整大小时,通知地图尺寸变化时触发 |
| RightClick | string | null | 在地图上右键点击元素时触发 |
| ShapeHighlight | string | null | 形状高亮前触发 |
| ShapeRendering | string | null | 地图形状渲染前触发 |
| ShapeSelected | string | null | 在地图中选择形状时触发 |
| TooltipRender | string | null | 地图提示框渲染前触发 |
| TooltipRenderComplete | string | null | 地图提示框渲染完成后触发 |
| Zoom | string | null | 执行缩放操作(放大、缩小)前触发 |
| ZoomComplete | string | null | 缩放操作完成后触发 |
MapsLayer Class
MapsLayer类
Defines the configuration for individual map layers supporting geometry data, map providers, and data binding.
定义单个地图图层的配置,支持几何数据、地图提供商和数据绑定。
Key Properties
关键属性
| Property | Type | Default | Description |
|---|---|---|---|
| DataSource | object | null | Data source for binding with shapes |
| ShapeData | object | null | GeoJSON data for rendering the shapes |
| ShapeDataPath | string | null | Property path in the data source to match with shapes |
| ShapePropertyPath | string[] | null | Property path in the shape data to match with data source |
| BubbleSettings | List<MapsBubble> | null | Configuration for bubble visualization |
| MarkerSettings | List<MapsMarker> | null | Configuration for marker visualization |
| DataLabelSettings | MapsDataLabelSettings | null | Configuration for data labels on shapes |
| NavigationLineSettings | List<MapsNavigationLine> | null | Configuration for navigation lines |
| SelectionSettings | MapsSelectionSettings | null | Configuration for shape selection |
| HighlightSettings | MapsHighlightSettings | null | Configuration for shape highlighting on hover |
| TooltipSettings | MapsTooltipSettings | null | Configuration for layer tooltips |
| ShapeSettings | MapsShapeSettings | null | Configuration for shape styling |
| Type | string | "Layer" | Layer type (Layer or SubLayer) |
| Visible | bool | true | Gets or sets the visibility of the layer |
| 属性 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| DataSource | object | null | 用于与形状绑定的数据源 |
| ShapeData | object | null | 用于渲染形状的GeoJSON数据 |
| ShapeDataPath | string | null | 数据源中用于与形状匹配的属性路径 |
| ShapePropertyPath | string[] | null | 形状数据中用于与数据源匹配的属性路径 |
| BubbleSettings | List<MapsBubble> | null | 气泡可视化的配置 |
| MarkerSettings | List<MapsMarker> | null | 标记可视化的配置 |
| DataLabelSettings | MapsDataLabelSettings | null | 形状上数据标签的配置 |
| NavigationLineSettings | List<MapsNavigationLine> | null | 导航线路的配置 |
| SelectionSettings | MapsSelectionSettings | null | 形状选择的配置 |
| HighlightSettings | MapsHighlightSettings | null | 悬停时形状高亮的配置 |
| TooltipSettings | MapsTooltipSettings | null | 图层提示框的配置 |
| ShapeSettings | MapsShapeSettings | null | 形状样式的配置 |
| Type | string | "Layer" | 图层类型(Layer或SubLayer) |
| Visible | bool | true | 获取或设置图层的可见性 |
MapsZoomSettings Class
MapsZoomSettings类
Manages map zoom and pan behavior.
管理地图缩放和平移行为。
Key Properties
关键属性
| Property | Type | Default | Description |
|---|---|---|---|
| Enable | bool | false | Enables or disables zooming in maps |
| ToolbarOrientation | string | "Vertical" | Specifies the orientation of zoom toolbar (Horizontal/Vertical) |
| Toolbars | string[] | null | Defines zoom toolbar buttons (Zoom, ZoomIn, ZoomOut, Pan, Reset) |
| ZoomFactor | double | 2 | Zoom factor for each zoom in or zoom out |
| MinZoom | double | 1 | Minimum zoom level |
| MaxZoom | double | 28 | Maximum zoom level |
| EnableMouseWheelZoom | bool | false | Enable zooming using mouse wheel |
| EnablePinchZoom | bool | false | Enable zooming using pinch gesture on touch devices |
| EnableSelectionZooming | bool | false | Enable zooming by selection (draw box to zoom) |
| EnableDoubleTapZoom | bool | true | Enable zooming on double tap |
| 属性 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| Enable | bool | false | 启用或禁用地图缩放 |
| ToolbarOrientation | string | "Vertical" | 指定缩放工具栏的方向(Horizontal/Vertical) |
| Toolbars | string[] | null | 定义缩放工具栏按钮(Zoom、ZoomIn、ZoomOut、Pan、Reset) |
| ZoomFactor | double | 2 | 每次放大或缩小的缩放系数 |
| MinZoom | double | 1 | 最小缩放级别 |
| MaxZoom | double | 28 | 最大缩放级别 |
| EnableMouseWheelZoom | bool | false | 启用鼠标滚轮缩放 |
| EnablePinchZoom | bool | false | 在触摸设备上启用捏合缩放 |
| EnableSelectionZooming | bool | false | 启用选择缩放(绘制框进行缩放) |
| EnableDoubleTapZoom | bool | true | 启用双击缩放 |
MapsShapeSettings Class
MapsShapeSettings类
Configures appearance and behavior of shapes in the map.
配置地图中形状的外观和行为。
Key Properties
关键属性
| Property | Type | Default | Description |
|---|---|---|---|
| Fill | string | "#E5E5E5" | Color to fill the shapes |
| Opacity | double | 1.0 | Opacity of shapes (0 to 1) |
| Palette | string[] | null | Color palette for color mapping |
| ColorValuePath | string | null | Property path in data source for color mapping |
| ColorMapping | List<MapsColorMapping> | null | Color mapping configuration |
| DashArray | string | "" | Defines dash pattern for shape borders |
| 属性 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| Fill | string | "#E5E5E5" | 形状的填充颜色 |
| Opacity | double | 1.0 | 形状的透明度(0到1) |
| Palette | string[] | null | 颜色映射的调色板 |
| ColorValuePath | string | null | 数据源中用于颜色映射的属性路径 |
| ColorMapping | List<MapsColorMapping> | null | 颜色映射配置 |
| DashArray | string | "" | 定义形状边框的虚线模式 |
MapsMarker Class
MapsMarker类
Defines markers to be displayed on the map at specified coordinates.
定义要在地图指定坐标处显示的标记。
Key Properties
关键属性
| Property | Type | Default | Description |
|---|---|---|---|
| DataSource | object | null | Data source containing marker locations and properties |
| Latitude | double | null | Latitude coordinate for marker placement |
| Longitude | double | null | Longitude coordinate for marker placement |
| Shape | MarkerType | Circle | Marker shape (Circle, Rectangle, Image, Letter, Template) |
| Width | double | 20 | Width of the marker |
| Height | double | 20 | Height of the marker |
| Fill | string | "#F41747" | Fill color of the marker |
| Border | string | null | Border configuration |
| ImageUrl | string | null | Image URL for image type markers |
| TooltipSettings | MapsTooltipSettings | null | Tooltip configuration for markers |
| 属性 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| DataSource | object | null | 包含标记位置和属性的数据源 |
| Latitude | double | null | 标记放置的纬度坐标 |
| Longitude | double | null | 标记放置的经度坐标 |
| Shape | MarkerType | Circle | 标记形状(Circle、Rectangle、Image、Letter、Template) |
| Width | double | 20 | 标记的宽度 |
| Height | double | 20 | 标记的高度 |
| Fill | string | "#F41747" | 标记的填充颜色 |
| Border | string | null | 边框配置 |
| ImageUrl | string | null | 图片类型标记的图片URL |
| TooltipSettings | MapsTooltipSettings | null | 标记的提示框配置 |
Related Classes (40+ classes available)
相关类(提供40+个类)
| Class | Purpose | API Link |
|---|---|---|
| MapsLegendSettings | Configure and customize legend | Link |
| MapsTooltipSettings | Configure tooltip behavior | Link |
| MapsBubble | Bubble visualization settings | Link |
| MapsColorMapping | Define color mapping rules | Link |
| MapsDataLabelSettings | Data label customization | Link |
| MapsAnnotation | Annotation configuration | Link |
| MapsNavigationLine | Navigation line settings | Link |
| MapsMarkerClusterSettings | Marker clustering configuration | Link |
| MapsTitleSettings | Map title customization | Link |
| MapsMargin | Margin configuration | Link |
Enumerations
枚举
ProjectionType
ProjectionType
Defines supported map projections.
| Value | Description |
|---|---|
| Mercator | Web Mercator projection (default) |
| EquirectangularProjection | Equirectangular/Plate Carée projection |
| MercatorProjection | Mercator projection |
| Miller | Miller cylindrical projection |
| NaturalEarth1 | Natural Earth 1 projection |
| NaturalEarth2 | Natural Earth 2 projection |
定义支持的地图投影类型。
| 值 | 描述 |
|---|---|
| Mercator | Web墨卡托投影(默认) |
| EquirectangularProjection | 等距圆柱/Plate Carée投影 |
| MercatorProjection | 墨卡托投影 |
| Miller | 米勒圆柱投影 |
| NaturalEarth1 | Natural Earth 1投影 |
| NaturalEarth2 | Natural Earth 2投影 |
MarkerType
MarkerType
Defines available marker shapes.
| Value | Description |
|---|---|
| Circle | Circular marker |
| Rectangle | Rectangular marker |
| Triangle | Triangular marker |
| Diamond | Diamond-shaped marker |
| Image | Custom image marker |
| Letter | Letter-based marker |
| Template | Custom template marker |
定义可用的标记形状。
| 值 | 描述 |
|---|---|
| Circle | 圆形标记 |
| Rectangle | 矩形标记 |
| Triangle | 三角形标记 |
| Diamond | 菱形标记 |
| Image | 自定义图片标记 |
| Letter | 基于文字的标记 |
| Template | 自定义模板标记 |
MapsTheme
MapsTheme
Defines available themes.
| Value | Description |
|---|---|
| Material | Material design theme |
| Fabric | Fabric design theme |
| HighContrast | High contrast theme |
| BootstrapDark | Bootstrap dark theme |
| BootstrapLight | Bootstrap light theme |
定义可用的主题。
| 值 | 描述 |
|---|---|
| Material | Material设计主题 |
| Fabric | Fabric设计主题 |
| HighContrast | 高对比度主题 |
| BootstrapDark | Bootstrap深色主题 |
| BootstrapLight | Bootstrap浅色主题 |
TooltipGesture
TooltipGesture
Defines tooltip display modes.
| Value | Description |
|---|---|
| MouseMove | Display on mouse move (default) |
| Click | Display on click |
| DoubleClick | Display on double click |
定义提示框显示模式。
| 值 | 描述 |
|---|---|
| MouseMove | 鼠标移动时显示(默认) |
| Click | 点击时显示 |
| DoubleClick | 双击时显示 |
LegendType
LegendType
Defines legend types.
| Value | Description |
|---|---|
| Layers | Legend for layers |
| Markers | Legend for markers |
| Bubbles | Legend for bubbles |
定义图例类型。
| 值 | 描述 |
|---|---|
| Layers | 图层图例 |
| Markers | 标记图例 |
| Bubbles | 气泡图例 |
Common Patterns
常见模式
Pattern 1: Choropleth Map with Data Binding
模式1:带数据绑定的分级统计图
Use Case: Visualize statistical data across regions with color-coded shapes.
cshtml
@{
var colorMapping = new List<MapsColorMapping> {
new MapsColorMapping { Value = "Low", Color = "#90EE90" },
new MapsColorMapping { Value = "Medium", Color = "#FFD700" },
new MapsColorMapping { Value = "High", Color = "#FF6347" }
};
}
<e-maps-layer shapeData="@geoJsonData"
dataSource="@statisticsData"
shapeDataPath="RegionName"
shapePropertyPath="@(new[] { "name" })">
<e-layersettings-shapesettings
colorValuePath="DataLevel"
colorMapping="colorMapping">
</e-layersettings-shapesettings>
</e-maps-layer>使用场景: 通过颜色编码的形状可视化各区域的统计数据。
cshtml
@{
var colorMapping = new List<MapsColorMapping> {
new MapsColorMapping { Value = "Low", Color = "#90EE90" },
new MapsColorMapping { Value = "Medium", Color = "#FFD700" },
new MapsColorMapping { Value = "High", Color = "#FF6347" }
};
}
<e-maps-layer shapeData="@geoJsonData"
dataSource="@statisticsData"
shapeDataPath="RegionName"
shapePropertyPath="@(new[] { "name" })">
<e-layersettings-shapesettings
colorValuePath="DataLevel"
colorMapping="colorMapping">
</e-layersettings-shapesettings>
</e-maps-layer>Pattern 2: Interactive Map with Zoom and Selection
模式2:带缩放和选择的交互式地图
Use Case: Enable user interaction for detailed exploration.
cshtml
<ejs-maps id="maps">
<e-maps-zoomsettings
enable="true"
enableSelectionZooming="true"
toolbars='new string[] {"Zoom", "ZoomIn", "ZoomOut", "Pan", "Reset"}'>
</e-maps-zoomsettings>
<e-maps-layers>
<e-maps-layer shapeData="@mapData">
<e-layersettings-selectionsettings
enable="true"
fill="#8B0000"
opacity="0.5">
</e-layersettings-selectionsettings>
<e-layersettings-highlightsettings
enable="true"
fill="#FF6347">
</e-layersettings-highlightsettings>
</e-maps-layer>
</e-maps-layers>
</ejs-maps>使用场景: 启用用户交互以进行详细探索。
cshtml
<ejs-maps id="maps">
<e-maps-zoomsettings
enable="true"
enableSelectionZooming="true"
toolbars='new string[] {"Zoom", "ZoomIn", "ZoomOut", "Pan", "Reset"}'>
</e-maps-zoomsettings>
<e-maps-layers>
<e-maps-layer shapeData="@mapData">
<e-layersettings-selectionsettings
enable="true"
fill="#8B0000"
opacity="0.5">
</e-layersettings-selectionsettings>
<e-layersettings-highlightsettings
enable="true"
fill="#FF6347">
</e-layersettings-highlightsettings>
</e-maps-layer>
</e-maps-layers>
</ejs-maps>Pattern 3: Multiple Data Layers
模式3:多数据图层
Use Case: Overlay multiple data sets on a single map.
cshtml
<e-maps-layers>
<!-- Base layer: Country boundaries -->
<e-maps-layer shapeData="@countryData" type="Layer">
<e-layersettings-shapesettings fill="#E5E5E5"></e-layersettings-shapesettings>
</e-maps-layer>
<!-- Sublayer: State boundaries -->
<e-maps-layer shapeData="@stateData" type="SubLayer">
<e-layersettings-shapesettings fill="transparent" border-width="1"></e-layersettings-shapesettings>
</e-maps-layer>
<!-- Data layer: Markers -->
<e-maps-layer type="Layer">
<e-layersettings-markersettings>
<e-layersettings-markersetting dataSource="@locations" shape="Circle"></e-layersettings-markersetting>
</e-layersettings-markersettings>
</e-maps-layer>
</e-maps-layers>使用场景: 在单个地图上叠加多个数据集。
cshtml
<e-maps-layers>
<!-- 基础图层:国家边界 -->
<e-maps-layer shapeData="@countryData" type="Layer">
<e-layersettings-shapesettings fill="#E5E5E5"></e-layersettings-shapesettings>
</e-maps-layer>
<!-- 子图层:州边界 -->
<e-maps-layer shapeData="@stateData" type="SubLayer">
<e-layersettings-shapesettings fill="transparent" border-width="1"></e-layersettings-shapesettings>
</e-maps-layer>
<!-- 数据图层:标记 -->
<e-maps-layer type="Layer">
<e-layersettings-markersettings>
<e-layersettings-markersetting dataSource="@locations" shape="Circle"></e-layersettings-markersetting>
</e-layersettings-markersettings>
</e-maps-layer>
</e-maps-layers>Pattern 4: Bing Maps Integration
模式4:Bing Maps集成
Use Case: Use Bing Maps as base layer with custom data overlay.
cshtml
<ejs-maps id="maps">
<e-maps-layers>
<!-- Bing Maps base layer -->
<e-maps-layer layerType="Bing" bingMapType="Aerial" key="YOUR_BING_MAPS_KEY">
</e-maps-layer>
<!-- Data overlay layer -->
<e-maps-layer type="SubLayer" shapeData="@customData">
<e-layersettings-shapesettings fill="#FF6347" opacity="0.5"></e-layersettings-shapesettings>
</e-maps-layer>
</e-maps-layers>
</ejs-maps>使用场景: 使用Bing Maps作为基础图层并叠加自定义数据。
cshtml
<ejs-maps id="maps">
<e-maps-layers>
<!-- Bing Maps基础图层 -->
<e-maps-layer layerType="Bing" bingMapType="Aerial" key="YOUR_BING_MAPS_KEY">
</e-maps-layer>
<!-- 数据叠加图层 -->
<e-maps-layer type="SubLayer" shapeData="@customData">
<e-layersettings-shapesettings fill="#FF6347" opacity="0.5"></e-layersettings-shapesettings>
</e-maps-layer>
</e-maps-layers>
</ejs-maps>Key Properties Reference
关键属性参考
Essential Properties
核心属性
| Property | Purpose | Example |
|---|---|---|
| GeoJSON data for rendering shapes | |
| Data to bind to shapes | |
| Property in dataSource to match shapes | |
| Property in GeoJSON to match data | |
| Data property for color mapping | |
| Define color ranges/values | |
| 属性 | 用途 | 示例 |
|---|---|---|
| 用于渲染形状的GeoJSON数据 | |
| 要绑定到形状的数据 | |
| 数据源中用于匹配形状的属性 | |
| GeoJSON中用于匹配数据的属性 | |
| 用于颜色映射的数据属性 | |
| 定义颜色范围/值 | |
Layer Configuration
图层配置
| Property | Purpose | Common Values |
|---|---|---|
| Layer type | |
| Provider type | |
| Show/hide layer | |
| Shape styling | Fill, border, palette |
| Marker configuration | Shape, size, color |
| Bubble configuration | Size, color, radius |
| 属性 | 用途 | 常用值 |
|---|---|---|
| 图层类型 | |
| 提供商类型 | |
| 显示/隐藏图层 | |
| 形状样式 | 填充色、边框、调色板 |
| 标记配置 | 形状、大小、颜色 |
| 气泡配置 | 大小、颜色、半径 |
Interaction Settings
交互设置
| Property | Purpose | Configuration |
|---|---|---|
| Zoom configuration | |
| Tooltip configuration | |
| Selection configuration | |
| Hover highlight | |
| 属性 | 用途 | 配置项 |
|---|---|---|
| 缩放配置 | |
| 提示框配置 | |
| 选择配置 | |
| 悬停高亮 | |
Common Use Cases
常见使用场景
Use Case 1: Sales Dashboard by Region
场景1:按区域划分的销售仪表盘
Create a choropleth map showing sales performance across different regions with color-coded intensity.
Applies: Color mapping, data binding, legend, tooltips
创建分级统计图,通过颜色编码强度展示不同区域的销售业绩。
涉及功能: 颜色映射、数据绑定、图例、提示框
Use Case 2: Store Locator
场景2:门店定位器
Display retail store locations on a map with custom markers, allowing users to zoom and click for details.
Applies: Markers, tooltips, zooming, Bing/OSM integration
在地图上展示零售门店位置,使用自定义标记,允许用户缩放并点击查看详情。
涉及功能: 标记、提示框、缩放、Bing/OSM集成
Use Case 3: Population Density Visualization
场景3:人口密度可视化
Show population density using bubble sizes, with larger bubbles representing higher populations.
Applies: Bubbles, data binding, legend, color mapping
使用气泡大小展示人口密度,更大的气泡代表更高的人口数量。
涉及功能: 气泡、数据绑定、图例、颜色映射
Use Case 4: Election Results Map
场景4:选举结果地图
Visualize election results by state/region with color coding and interactive selection.
Applies: Color mapping, selection, highlight, data labels, legend
通过颜色编码和交互式选择可视化各州/区域的选举结果。
涉及功能: 颜色映射、选择、高亮、数据标签、图例
Use Case 5: Shipping Routes Visualization
场景5:航运路线可视化
Display shipping routes between cities using navigation lines with directional arrows.
Applies: Navigation lines, markers, annotations, layers
使用带方向箭头的导航线路展示城市间的航运路线。
涉及功能: 导航线路、标记、注释、图层
Use Case 6: Weather Map Dashboard
场景6:天气地图仪表盘
Overlay weather data on maps with custom annotations and real-time data updates.
Applies: Annotations, dynamic data, multiple layers, map providers
在地图上叠加天气数据,使用自定义注释和实时数据更新。
涉及功能: 注释、动态数据、多层级图层、地图提供商
Use Case 7: Real Estate Property Map
场景7:房地产地图
Show property listings with custom markers, filtering, and detailed tooltips.
Applies: Markers, custom templates, tooltips, zooming, panning
展示房产列表,使用自定义标记、筛选和详细提示框。
涉及功能: 标记、自定义模板、提示框、缩放、平移
Related Components
相关组件
- Chart - For non-geographical data visualization
- HeatMap - For matrix-based heat map visualization
- TreeMap - For hierarchical data visualization
- Diagram - For network and flowchart visualization
- Chart - 用于非地理数据可视化
- HeatMap - 用于基于矩阵的热力图可视化
- TreeMap - 用于层级数据可视化
- Diagram - 用于网络和流程图可视化