简体   繁体   English

Osmdroid 作为 Mapbox 的替代品

[英]Osmdroid as alternative to Mapbox

I am currently using MapBox SDK to display raster map tiles within an Java/Kotlin implemented Android app.我目前正在使用 MapBox SDK 在 Java/Kotlin 实现的 Android 应用程序中显示光栅 map 瓷砖。 However, I want to replace the Mapbox SDK with an alternative primarily because, as far as I understand, when I use MapBox SDK in my app even just to display other third party map tiles, it will result in some location information about my user's being intermittently sent to Mapbox.但是,我想用替代方法替换 Mapbox SDK,主要是因为据我所知,当我在我的应用程序中使用 MapBox SDK 时,即使只是为了在某些位置信息中显示其他第三方 Z1D78DC8ED51214E518B5114FE244,它也会导致用户间歇性地发送到 Mapbox。 I am now considering osmdroid and was looking for some input on whether this will be an appropriate alternative.我现在正在考虑使用 osmdroid,并正在寻找一些关于这是否是一个合适的选择的意见。 I am using Here maps as the primary source of raster map tiles [though I also have limited coverage map tile server (generated from OSM) of my own which I do not currently use but might as an alternative if needed].我使用 Here maps 作为光栅 map 瓦片的主要来源 [尽管我自己的 map 瓦片服务器(从 OSM 生成)的覆盖范围也有限,我目前不使用它,但如果需要,可以作为替代方案]。 Within the app, the functionality that I want to implement is relatively simple:在应用程序中,我要实现的功能相对简单:

(1) Display map tiles based on standard X,Y,Z system (2) Display tap-able icons overlaid at certain (GPS) locations on the displayed maps (3) Allow user to zoom in-out or scroll across the displayed map (1) 基于标准 X、Y、Z 系统显示 map 瓷砖 (2) 在显示的地图上的某些 (GPS) 位置显示可点击的图标 (3) 允许用户放大或滚动显示的 map

However, one absolute key requirement is that none of my user location information will be shared as part of the terms of usage for the SDK.然而,一个绝对的关键要求是,我的任何用户位置信息都不会作为 SDK 使用条款的一部分被共享。

Is Osmdroid SDK a possible suitable alternative to mapbox SDK for this? Osmdroid SDK 是否是 mapbox SDK 的合适替代品?

Thanks for any comments.感谢您的任何评论。

Since 2017, I've been using the OsmDroid SDK quite frequently.自 2017 年以来,我一直在频繁使用 OsmDroid SDK。 The SDK is primarily used to create my situational awareness map application and to manage my offline GeoPackage raster and vector map collections via OsmDroid GeoPackage API support, though the core GeoPackage API allows me to use online GeoPackage-based map providers. The SDK is primarily used to create my situational awareness map application and to manage my offline GeoPackage raster and vector map collections via OsmDroid GeoPackage API support, though the core GeoPackage API allows me to use online GeoPackage-based map providers.

To respond to your inquiry: No user data, including location, is stored by the OsmDroid APIs.回复您的询问: OsmDroid API 不存储任何用户数据,包括位置信息。 It is merely an SDK for manipulating its MapView (which extends from Android's ViewGroup) and supports loading tile sources from online/offline map databases.它只是一个 SDK 用于操作其 MapView(从 Android 的 ViewGroup 扩展)并支持从在线/离线 map 数据库加载图块源。

It will be our responsibility to implement our own location positioning codes so that any user position, in addition to other map objects you want to include in the map, can be drawn on the map. It will be our responsibility to implement our own location positioning codes so that any user position, in addition to other map objects you want to include in the map, can be drawn on the map.

Unlike the Google Maps SDK, no API key is required for the OsmDroid SDK.与 Google 地图 SDK 不同,OsmDroid SDK 不需要 API 密钥。 In fact, it attempts to emulate what the Google Maps SDK can do while remaining royalty-free and open-source license compliant.事实上,它试图模仿 Google Maps SDK 在保持免版税和开源许可的同时可以做什么。 It primarily serves OpenStreetMap purposes.它主要服务于 OpenStreetMap 目的。 To improve the OsmDroid experience, a free OsmBonusPack SDK simplifies developer use-cases.为了改善 OsmDroid 体验,免费的 OsmBonusPack SDK 简化了开发人员用例。

https://github.com/MKergall/osmbonuspack https://github.com/MKergall/osmbonuspack

Except that you'll need a TOKEN/API key from the map database provider of your choice for any non-free map databases you want to use as base maps or tile sources.除了您需要来自您选择的 map 数据库提供商的 TOKEN/API 密钥之外,您需要将任何非免费 map 数据库用作基础地图或切片源。 This requires you to code in the necessary parameters for the tile module provider to work.这需要您编写必要的参数以使 tile 模块提供程序工作。

https://github.com/osmdroid/osmdroid/wiki/Map-Sources https://github.com/osmdroid/osmdroid/wiki/Map-Sources

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM