【发布时间】:2018-11-18 16:37:10
【问题描述】:
我正在使用 osmdroid 库在我的应用程序中提供 osm 映射功能。
compile 'org.osmdroid:osmdroid-android:6.0.2'
在功能方面一切正常,但我有一个与地图外观有关的问题。一个网站也正在开发中,用于与应用程序相同的功能,并且在网络中他们也使用 osm 地图。 现在的问题是地图在网站上看起来很清晰,而在 Android 设备上看起来很模糊。
查看附件截图
手机截图
网页截图
以下是我在我的 Android 应用中加载地图的代码。
binding.map.setTileSource(TileSourceFactory.MAPNIK);
binding.map.setTilesScaledToDpi(true);
binding.map.setBuiltInZoomControls(false);
binding.map.setMultiTouchControls(true);
if (gpsTracker.canGetLocation()) {
if (gpsTracker.getLocation() != null) {
currentLocation = gpsTracker.getLocation();
centreLocation = gpsTracker.getLocation();
addCurrentLocationMarker(currentLocation);
getMarkersInCurrentLocation(currentLocation);
} else {
gpsTracker.showSettingsAlert();
}
} else {
gpsTracker.showSettingsAlert();
//Toast.makeText(getApplicationContext(), "Unable to get current location", Toast.LENGTH_LONG).show();
}
这与我使用的磁贴源有关吗?
【问题讨论】:
标签: android openstreetmap osmdroid