【发布时间】:2019-03-29 09:24:03
【问题描述】:
我已经对我的要素图层进行了查询并得到了结果。唯一的问题是生成的对象不包含 LAT 和 LNG 属性。问题来了:
centerAndZoomOnAsset(assetId: string) {
let query = this.pipeFL.createQuery();
query.where = `AssetId = '${assetId}'`;
query.outFields = ['*'];
this.pipeFL.queryFeatures(query).then((result: esri.FeatureSet) => {
debugger;
const foundFeatureGraphic: esri.Graphic = result.features[0];
if (foundFeatureGraphic) {
const center = foundFeatureGraphic.geometry.extent.center.clone();
此时我有一个中心值,它有 x,y 坐标,但是,我没有:center.latitude 或 center.longitude... 我不明白为什么它没有它。当我对点击进行命中测试时,它同时包含 lat 和 lng,但是当我从命中测试之外查询时,它不包含我的 lat 和 lng。 关于为什么会发生这种情况的任何想法?
【问题讨论】:
-
center.x 是 center.longitude
标签: esri arcgis-js-api esri-maps