ArcGIS API for JS 之 FeatureLayer(一)FeatureLayer的创建

ArcGIS API for JS 之 FeatureLayer (一)FeatureLayer的创建

最近项目中用到了ArcGIS API中的FeatureLayer进行数据的前端显示、处理等操作,踩了很多坑,记录如下——


1.FeatureLayer简介

A FeatureLayer is a single layer that can be created from a Map Service or Feature Service.
FeatureLayer(要素图层)可以利用MapService或者FeatureService创建。

The layer can be either a spatial (has geographic features) or non-spatial (table).
图层可以是空间化的也可以是非空间化的。

Spatial layer is composed of discrete features, each of which has a Geometry that allows it to be rendered in either a 2D MapView or 3D SceneView as a graphic with spatial context.
空间化的图层由离散的feature组成,这些feature都具有geometry,可以用来在二三维地图上渲染。

Features also contain data attributes that provide additional information about the real-world feature it represents; attributes may be viewed in popup windows and used for rendering the layer.
feature的属性信息可以描述这个要素的相关附加信息。这些属性信息可以在弹窗内展示,也可用于渲染图层。

FeatureLayers may be queried, analyzed, and rendered to visualize data in a spatial context.
FeatureLayers可用以查询、分析以及在空间环境中渲染可视化数据。

2.FeatureLayer图层初始化

通过FeatureLayer构造函数进行初始化,如果用feature service服务创建图层,则url是必须属性。

require(["esri/layers/FeatureLayer"],function (FeatureLayer) {
   
	this.myFeatureLayer= new FeatureLayer({
   
  • 2
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值