我有一个以米为单位定义的坐标系中的3D模型。坐标已转换为以模型边界框的中心作为原点。因此,坐标为(1,0,0)的顶点将位于距原点1米的位置。
当尝试将几何图形添加到地图时,如果原点的实际纬度/经度为geoPosition,则它们不会被放置在确切的位置,并且看起来比实际位置小。我该怎么解决这个问题呢?
谢谢。
发布于 2020-01-28 13:45:08
使用此方法,您可以将地图居中放置在世界上任何您想要的位置:
map.setCameraGeolocationAndZoom(
//Singapore coordinates and zoom level 16:
new harp.GeoCoordinates(1.278676, 103.850216), 16
);您可以在MapView的构造函数中指定投影类型。
要实现地球投影,请执行以下操作:
const map = new harp.MapView({
canvas,
theme: "https://unpkg.com/@here/harp-map-theme@latest/resources/berlin_tilezen_base_globe.json",
projection: harp.sphereProjection,
//For tile cache optimization:
maxVisibleDataSourceTiles: 40,
tileCacheSize: 100
});
//And set it to a view where you can see the whole world:
map.setCameraGeolocationAndZoom(new harp.GeoCoordinates(1.278676, 103.850216), 4);有关更多参考信息,请参阅文档:
https://stackoverflow.com/questions/58659307
复制相似问题