我想在 basemap 项目上做一些简单的事情。
- 例如创建一个圆圈。
- 单击创建的点时创建弹出窗口。
- 将 lat long 转换为 x y
我该如何做这些事情?
最佳答案
var pt = new Point({
longitude: 99.909550,
latitude: 99.751906
});
var lineAtt = {
Name: "fill",
Owner: "fill",
Length: "999 km"
};
// Create a graphic and add the geometry and symbol to it
var pointGraphic = new Graphic({
geometry: pt,
symbol: markerSymbol,
attributes: lineAtt,
popupTemplate: { // autocasts as new PopupTemplate()
title: "{Name}",
content: [{
type: "fields",
fieldInfos: [{
fieldName: "Name"
}, {
fieldName: "Owner"
}, {
fieldName: "Length"
}]
}]
}
});
我找到了单击创建的点时打开弹出窗口的解决方案。
关于javascript - 创建点、弹出窗口、圆、转换坐标问题(Arcgis JS 4.6 API),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49449798/