gpt4 book ai didi

javascript - 创建点、弹出窗口、圆、转换坐标问题(Arcgis JS 4.6 API)

转载 作者:行者123 更新时间:2023-12-03 02:13:35 25 4
gpt4 key购买 nike

我想在 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com