Closed andrey-serdyuk closed 1 year ago
class MapTileDataSource(model: MapTile) : HTTPTileDataSource(1, 19, model.tile.replace("[lc]", AppSettings.locale)) {
init {
subdomains = model.vectors
httpHeaders = StringMap().apply {
set("User-Agent", "PostmanRuntime/7.30.0")
set("Accept", "*/*")
set("Cache-Control", "no-cache")
set("Accept-Encoding", "gzip, deflate, br")
set("Connection", "keep-alive")
}
}
}
Http User-Agent has solved the issue.
Hey. My native(Kotlin) Android app doesn't loads OSM tiles. I'm receiving Bad request logs when I'm trying to load it. All other tiles like Google and Bing are working fine but, OSM is not.
Here is my extention of HTTPTileDataSource
my map tile based on PersistentCacheTileDataSource
class MapTileCache(model: MapTile) : PersistentCacheTileDataSource(MapTileDataSource(model), "cached_${model.value}_${AppSettings.locale}_tile.db")
TileModel
MapTileDataSource receives a MapTile instance and passes his tile property value as URL to HTTPTileDataSource.
Generated links are loading tiles when I open them in a browser but they don't loading up in the app. Here are some logs:
Thanks for a help in advance.