MAPBOX导航摄像头角度取决于指导

发布于 2025-01-30 14:43:27 字数 117 浏览 2 评论 0原文

我想知道是否有一种方法可以根据指导进行整合不同的相机角度 + Zoom(Ex:高速公路= 40° / National = 30° /部门= 20° / City = 10°),以及是否通过Mapbox SDK中的默认值

I would like to know if there is a way to integrate different camera angles + zoom depending on the guidance (ex: Highway=40° / National=30° / Departmental=20° / city=10°) and if it is integrated by default in the MapBox sdk and thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

爱,才寂寞 2025-02-06 14:43:27

我不确定我完全理解您的问题。但是,是的,您可以为地图实例分配不同的缩放和音高(角度)。

当您说“指导”时,我将其解释为范围或级别。您正在询问是否在不同的级别上可以分配不同的缩放和音高。

要更新这些简单的调用:

map.setZoom(zoom_value);
map.setPitch(pitch_value);

始终将相同的缩放和俯仰用于一个级别可能很棘手。考虑使用与您对斯里兰卡相同的变焦。或比较诸如里诺,内华达州,美国和墨西哥城等城市规模。

但是,默认情况下没有默认处理这些处理。

您可能会更适合使用FitBounds。但是,您'>但是您' LL仍然需要手动调整音高,因为FitBounds对此没有任何作用。

I'm not sure I fully understand your question. But yes, you are able to assign different zoom and pitch (angle) for your map instance.

When you say 'guidance', I'm interpreting that as scope or level. You're asking if at different levels you can assign different zooms and pitches.

To update these simply call:

map.setZoom(zoom_value);
map.setPitch(pitch_value);

Always using the same zoom and pitch for a level can be tricky though. Think about using the same zoom for USA as you would for Sri Lanka. Or compare city sizes like Reno, Nevada, USA and Mexico City.

However there is no default to handle these by default.

You would probably be better suited to use fitBounds. However you'll still need to manually adjust pitch because fitBounds doesn't do anything to it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文