NNU_从零开始了解一个WebGIS(ArcGISJsApi)_对ArcGIS的一些基本概念的区分
(1)Map:
Map只是一个容器,存储基础图层和业务图层(Layer)中包含的地理信息。(我猜测是以坐标形式存储的地理数据)(通俗理解就是存储地理信息的仓库/类似数据库)
Map 类包含用于存储、管理和叠加 Layer 并将其以 2D 或 3D 形式展示一些属性和方法。 可以在 Map 中添加和删除 Layer,通过 MapView(用于查看 2D 数据)或 SceneView(用于查看 3D 数据)渲染。 因此,地图实例是一个包含 Layer 的简单容器(Container),而 View 是显示 Map 中 Layer 和 BaseMap 并与之交互的手段。
Map 的实例是 MapView 和 SceneView 的重要组成部分。 Map 对象应该在视图之前创建,以便它可以传递到该视图的地图属性中(例如 MapView.map、SceneView.map)。
*A single map may be referenced by multiple views.(甚至可以同时在 MapView 和 SenseView 中调用同一个 Map)
(2)BaseMap:
创建的一个新的底图对象。 BaseMap 可以从 PortalItem、ArcGISJsApi自带的底图 ID ,您发布到您自己的服务器的切片服务,或者从第三方发布的切片服务中创建的。
(3)View:
View提供了查看地图组件并与之交互的方法。View 渲染 Map 及其各个图层,使它们对用户可见。
*包括MapView(2D)和SenseView(3D)。
*View 是 MapView 和 SceneView 的基类,没有构造函数。 要创建视图,您必须通过直接创建 MapView 或 SceneView 的实例来实现。
// Load the Map and MapView modules
require(["esri/Map", "esri/views/MapView"], function(Map, MapView) {
// Create a Map instance
let map = new Map({
basemap: "topo-vector"
});
// Create a MapView instance (for 2D viewing) and set its map property to
// the map instance we just created
let view = new MapView({
map: map,
container: "viewDiv"
});
});
注意:
1)要将 View 与 Map 关联,您必须将地图属性设置为 Map 的实例。
2)虽然多个 View 可以引用同一个 Map,但一个 View 不能关联多个 Map 实例。
View 还允许用户与地图的组件进行交互。 例如,当用户点击或触摸地图中某个要素的位置时,他们并没有触摸到该要素或地图; 该事件实际上是通过引用地图的视图和引用图层的图层视图来处理的。 因此,单击等事件不在地图或图层上处理,而是在 View 上处理。 有关其他详细信息,请参阅 MapView 和 SceneView。
(4)Layer:
图层是地图最基本的组成部分。它是表示现实世界现象的矢量图形或光栅图像形式的空间数据的集合。图层可能包含存储矢量数据的离散特征或存储栅格数据的连续像元/像素。
从广义上讲,层可以用于以下目的:
- 显示地理上下文的位置
- 查询数据用于查询、可视化、分析数据的层
- 显示分类和/或数字数据提供地理环境的图层
- 分析
基本来说,图层可分为:
- 用于查询、可视化、分析数据的层
- 提供地理环境的图层
(5)Renderer
对Renderer进行一些简单分类:
1)Unique types:Learn how to visualize data by categories(种类).
2)Class breaks:Learn how to classify data by discrete numeric ranges(离散数值范围).
What is a class breaks style?
The class breaks style allows you to visualize numeric ranges of data. It involves defining meaningful ranges of numbers into two or more classes, representing each class with a unique symbol. You can use this style to answer questions beginning with how much?
While a class break's symbol is distinct from another class break's symbol, symbols are typically similar to one another in all aspects with the exception of one property, such as color.
Class breaks are a good choice to use with percents, rates, ratios and other normalized data because the area or length or size of the feature is irrelevant. By coloring all the features based on their membership in a range of values, it allows direct visual comparison of the features. This works best when the features’ area or length or size does not vary too much.
3)Visual variables:Learn how to communicate potential relationships between two or more data attributes using multiple visual variables.
4)Time:Learn how to visualize dates as a timeline or an age relative to another date.
5)Multivariate:Learn how to visualize two or more data attributes with the same renderer.
6)Predominance:Learn how to visualize the predominant value among a set of competing attributes (or subcategories).
7)Dot density:Learn how to visualize the density of subcategories of a count or population.
8)Relationship:Learn how to visualize the potential relationship between two numeric attributes using a blend of two color ramps.
9)Smart mapping:Learn how to take advantage of Smart Mapping APIs to explore unfamiliar datasets.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
2020-07-29 winform 无边框窗口