Android OSM缩放级别19以上 [英] Android OSM zoom level 19 and above

查看:117
本文介绍了Android OSM缩放级别19以上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Android开发的新手.我有一个显示MapView的应用程序,并且设置了一个边界框以限制用户仅查看特定区域中的图块.我的问题是我需要放大到18级以上.通过设置最大缩放级别,我也可以做到这一点.但是,默认的图块提供程序没有可用于缩放19及以上的任何图块,我实际上也只需要最多20、21个.

I'm new to Android Development. I have an application that shows a MapView and I've set a bounding box to restrict the user to only viewing the tiles in a specific area. The issue I have is that I need to zoom in, past level 18. Which I've also been able to do so by setting the max zoom level. However, there aren't any tiles available from the default tile provider for zoom 19 and above I really only require up to 20, 21 max too.

我有办法创建自己的图块吗?有定制的瓷砖吗?生成我自己的地图?还是如果有图块提供者可以让我放大18级以上的地图,但仍然能够看到地图图块?

Is there a way for me to create my own tiles? Have custom tiles? Generate my own map? Or if there's a tile provider that allows me to zoom into the map past level 18 and still be able to see the map tiles?

我需要更高的缩放级别,因为我要覆盖自定义标记,并且如果缩放不足,则标记会重叠.如果我将标记尺寸缩小,则看不到...

I need a higher zoom level because I'm overlaying custom markers and if it's not zoomed in enough, the markers overlap. If I scale the marker size down, it's not visible enough...

我在最初的帖子中错过了一些其他详细信息,

Some other specific details I missed on my initial post,

  1. 我正在使用OpenStreetMap,因为我需要它提供的功能,可以在其中编辑道路并对其进行相应标记,以备将来的路线使用.

  1. I'm using OpenStreetMap because I need the feature it provides where I can edit the roads and tag them accordingly for future routing uses.

此外,由于最近的建设和装修,Google Maps为我选择的地理区域提供的图块已经过时.这使得该地图对于路由应用程序用户不可靠.

Also, the tiles that Google Maps provides for my selected geographical area is outdated due to recent construction and renovation. That makes the map unreliable for routing the application user.

该应用程序的目的是路由用户.因此,需要放大以单独查看更多标记. (故意将许多行标记紧密地放置在一起.)

The application's purpose is to route the user. Hence the requirement to zoom in closer to see many markers, individually. (There are a number and row of markers placed very close together, intentionally.)

推荐答案

假设您使用的是Osmdroid,则需要注意的19多个缩放级别存在一些已知问题.基本上,这是一个精度损失问题.有潜在的解决方案,但是项目所有者不想合并它.

Assuming you using Osmdroid, there are some know issues with > 19 zoom levels to be aware of. Basically it's a precision loss issue. There's a potential solution, however the project owner doesn't want to merge it.

我有办法创建自己的图块吗?

Is there a way for me to create my own tiles?

是的.有一些工具,例如Mobac和MapBox以及基于Ersi的产品.我确定还有其他人.

Yes. There's a few tools, such as Mobac, and MapBox as well as the Ersi based products. I'm sure there are others.

有自定义图块吗?

Have custom tiles?

是的,您可以在线或离线加载任何所需的,支持或可以转换为OSM的草绘地图格式(通常称为XYZ)的图块源.

Yes, you can load any tiles source you want, online or offline that supports or can be translated to OSM's slippy map format, commonly referred to as XYZ.

生成我自己的地图?还是如果有图块提供者可以让我放大18级以上的地图,但仍然能够看到地图图块?

Generate my own map? Or if there's a tile provider that allows me to zoom into the map past level 18 and still be able to see the map tiles?

Bing以及其他来源的图块在某些地理区域(但不是全部)上的分辨率为19+.请记住,存储需求(如果使用离线地图)会随着缩放级别成倍增加.

Bing, and probably other sources, have tiles that are at 19+ for certain geographic regions, but not all. Keep in mind that storage requirements (if using offline maps) increase exponentially with zoom level.

这篇关于Android OSM缩放级别19以上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆