【问题标题】:How set geolocation to the model with 'Autodesk.Geolocation'如何使用“Autodesk.Geolocation”为模型设置地理位置
【发布时间】:2020-01-23 08:03:59
【问题描述】:

我有一个用于转换 DWG 文件的应用程序,我需要在 ArcGis 地图上显示这些文件。 如何将地理位置添加到我的文件中?当我向 AutoCad 添加位置并在 forge 应用程序中打开文件时,位置属性为空并且 hasGeolocationData() 返回 false。

我尝试使用 AutoCAD 在 dwg 文件中添加位置 ![AutoCad - 屏幕]: https://ibb.co/HtBLpg5 但 ![位置为空 - 屏幕]:https://ibb.co/dQWmz9M 并尝试设置e.lmvToLonLat({x:-20.871083468967406, y: 6.520671770079398}), 但出现错误:

index.js:175 Uncaught (in promise) TypeError: Cannot read property 'lmv2LL84Point' 为空 在 t.value (index.js:175) 在 viewer.js:56

viewer.addEventListener(Autodesk.Viewing.GEOMETRY_LOADED_EVENT, args => {

  viewer.loadExtension('Autodesk.Geolocation')
      .then(e =>  {
        console.log(e.hasGeolocationData())
        e.lmvToLonLat({x:-20.871083468967406, y: 6.520671770079398})
        e.activate()
      })
});

【问题讨论】:

  • 您是否在here 后面添加了地理位置?如果是,并且翻译后仍然缺少地理定位数据(请与viewer.model.getData 核对),请将图纸发送至 forge.help@autodesk.com,以便我们进行调查...
  • 感谢布莱恩!我会将图纸发送至 forge.help@autodesk.com。你能给我一张我可以在伪造查看器中打开的带有地理位置的测试图吗?也许我在 AutoCad 中设置的位置不正确。

标签: autodesk-forge autodesk-viewer


【解决方案1】:

工程部门刚刚确认负责地理定位数据的提取器取自 Civil 3d - 他们的团队检查了您的绘图并提出以下建议:

EDITDRAWINGSETTINGS并选择项目所在的坐标系

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-01-17
    • 2017-07-13
    • 1970-01-01
    • 2012-10-18
    • 1970-01-01
    • 2020-12-28
    • 1970-01-01
    相关资源
    最近更新 更多