Skip to content

Commit fac1522

Browse files
authored
Merge pull request #117 from mahomaps/hybrid-map
Hybrid map
2 parents 91c969b + ee6f31d commit fac1522

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/mahomaps/map/TilesProvider.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class TilesProvider implements Runnable {
6161
// sat
6262
"https://core-sat.maps.yandex.net/tiles?l=sat&lang=",
6363
// hybrid
64-
// next PR
64+
"http://nnp.nnchan.ru/mergedtile.php?lang="
6565
};
6666

6767
public TilesProvider(String lang) {
@@ -575,7 +575,7 @@ public TileCache getTile(TileId tileId) {
575575
private String getUrl(TileId tileId) {
576576
String url = tilesUrls[tileId.map] + lang + "&x=" + tileId.x + "&y=" + tileId.y
577577
+ "&z=" + tileId.zoom;
578-
if (Settings.proxyTiles) {
578+
if (Settings.proxyTiles && url.startsWith("https")) {
579579
return Settings.proxyServer + YmapsApiBase.EncodeUrl(url);
580580
}
581581
return url;
@@ -586,7 +586,7 @@ private String getFileName(TileId id) {
586586
}
587587

588588
private String getRmsName(TileId id) {
589-
return "tile_" + lang + "_" + id.x + "_" + id.y + "_" + id.zoom + (id.map == 1 ? "_s" : "");
589+
return "tile_" + lang + "_" + id.x + "_" + id.y + "_" + id.zoom + (id.map > 0 ? "_" + id.map : "");
590590
}
591591

592592
public int GetCachedTilesCount() {

0 commit comments

Comments
 (0)