Skip to content

Offline vector map without the admin-console download (works in Turkey) / Çevrimdışı vektör harita: yönetim paneli indirmesi gerekmez (Türkiye'de çalışır) - #5

Open
turer73 wants to merge 1 commit into
schematrix:mainfrom
turer73:feat/offline-vector-map
Open

turer73 wants to merge 1 commit into
schematrix:mainfrom
turer73:feat/offline-vector-map

Conversation

@turer73

@turer73 turer73 commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

English · Türkçe

English

The README says IIAB's map download (contabostorage.com) is blocked in some countries such as Turkey and suggests Cloudflare WARP. This adds a second way that needs neither WARP nor the admin console.

scripts/download-map.sh (new)

  • Cuts a region from the Protomaps planet build with the pmtiles CLI (v1.31.2, tarball sha256 pinned for x86_64 and arm64). Default is Turkey, about 1.7 GB, zoom ≤ 15; MAP_NAME, MAP_BBOX (west,south,east,north) and MAP_MAXZOOM change it.
  • Installs a small MapLibre page plus fonts and sprites under /library/www/html/harita/. The four JS/CSS libraries are fetched from jsDelivr at pinned versions and verified against pinned sha256 values, so no minified JS is added to the repo (only the three BSD-3 licence texts).
  • Needs no nginx change: IIAB's nginx serves static files under /library/www/html with Range support, which is all PMTiles needs. Result: http://box.lan/harita/.
  • Only talks to build.protomaps.com, github.com and cdn.jsdelivr.net.
  • --update re-cuts only when a newer planet build exists; --force always re-cuts; a failed or unverifiable extract leaves no partial file; a corrupted library file is re-fetched on the next run.
  • Same style as the other scripts: sudo check, bilingual messages, flock, free-space check with RESERVE_GB.

Homepage: one row under "Haritalar ve Navigasyon". It sits next to the IIAB map, it does not replace it. README: step 6 alternative, repo-layout row, troubleshooting pointer, both languages.

Evidence (Debian x86_64 box, a fake IIAB web root served by a plain nginx:alpine, small extract so the run is quick)

Not tested, please check: a real IIAB install (its nginx config could differ from plain nginx), a Raspberry Pi 5 / arm64 run (the arm64 tarball hash was taken from the release file but the binary was not executed there), and an actual /library SSD mount.

Türkçe

README, IIAB'ın harita indirmesinin (contabostorage.com) Türkiye gibi bazı ülkelerde engelli olduğunu söylüyor ve Cloudflare WARP öneriyor. Bu PR WARP'a da yönetim paneline de ihtiyaç duymayan ikinci bir yol ekliyor.

scripts/download-map.sh (yeni)

  • Protomaps planet build'inden pmtiles CLI ile bölge keser (v1.31.2, x86_64 ve arm64 tarball sha256 değerleri sabit). Varsayılan Türkiye, yaklaşık 1,7 GB, zoom ≤ 15; MAP_NAME, MAP_BBOX (batı,güney,doğu,kuzey) ve MAP_MAXZOOM ile değişir.
  • /library/www/html/harita/ altına küçük bir MapLibre sayfası, yazı tipleri ve sprite'lar kurar. Dört JS/CSS kütüphanesi jsDelivr'den sabit sürümle indirilir ve sabit sha256 ile doğrulanır; depoya minify JS eklenmez (yalnız üç BSD-3 lisans metni).
  • nginx ayarı gerekmez: IIAB'ın nginx'i /library/www/html altındaki statik dosyaları Range desteğiyle sunar, PMTiles'ın tek ihtiyacı budur. Sonuç: http://box.lan/harita/.
  • Yalnızca build.protomaps.com, github.com ve cdn.jsdelivr.net adreslerine gider.
  • --update yalnız daha yeni build varsa yeniden keser; --force her zaman keser; başarısız ya da doğrulanamayan kesit yarım dosya bırakmaz; bozuk kütüphane dosyası sonraki koşuda yeniden indirilir.
  • Diğer betiklerle aynı üslup: sudo denetimi, iki dilli mesajlar, flock, RESERVE_GB ile yer kontrolü.

Ana sayfa: "Haritalar ve Navigasyon" altında bir satır; IIAB haritasının yanında durur, yerine geçmez. README: adım 6 alternatifi, repo yapısı satırı, sorun giderme yönlendirmesi, iki dilde.

Kanıt (Debian x86_64 makine, sahte IIAB web kökü, düz nginx:alpine ile sunuldu, koşu hızlı olsun diye küçük kesit)

Denenmedi, lütfen kontrol edin: gerçek bir IIAB kurulumu (nginx ayarı düz nginx'ten farklı olabilir), Raspberry Pi 5 / arm64 koşusu (arm64 tarball hash'i yayın dosyasından alındı ama ikili orada çalıştırılmadı) ve gerçek /library SSD bağlaması.

…e map download needed

IIAB'ın harita indirmesi (contabostorage) Türkiye'de engelli; README bunun için WARP öneriyor.
scripts/download-map.sh Protomaps planet build'inden bölge kesiti (PMTiles) alır, küçük bir
MapLibre sayfasını /library/www/html/harita/ altına kurar; nginx dosyaları olduğu gibi sunar
(Range desteği hazır), ek ayar yok. Türkiye kesiti ~1,7 GB, z15, Türkçe etiketli.

The IIAB map download (contabostorage) is blocked in Turkey and the README suggests WARP for it.
scripts/download-map.sh cuts a region (PMTiles) from the Protomaps planet build and installs a
small MapLibre page under /library/www/html/harita/; nginx serves the files as-is (Range works
out of the box), no extra config. Turkey extract ~1.7 GB, zoom 15, Turkish labels.
@schematrix

Copy link
Copy Markdown
Owner

Türkiye'deki harita derdini WARP'sız çözmüşsün, eline sağlık! Bir ricam var: font ve sprite paketi şu an main branch'ten iniyor. Betik root olarak çalıştığı için onu da bir commit'e ve SHA-256'ya sabitleyebilir misin? Sonra Pi'de gerçek IIAB kurulumunda deneyip sorun yoksa merge ederim.

You solved the map issue in Turkey without WARP, great job! One request: the fonts and sprites archive is downloaded from the main branch right now. Since the script runs as root, could you pin that to a commit and SHA-256 too? Then I'll test it on the Pi with a real IIAB install and merge if all good.

@Proxy34

Proxy34 commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@turer73 #5'i gerçek IIAB kurulu sanal makinede (Debian 13), diğer açık PR'larla birlikte kurup denedim. Küçük bir bölge kesildi (Kahramanmaraş merkez, z14), harita sayfası açıldı, yazı tipleri ve sprite'lar indi.

Bir önerim var: builds.json alınamadığında betik "build listesi alınamadı" deyip duruyor, ama harita dosyaları build.protomaps.com'dan yine de iniyor. Liste alınamazsa son birkaç günün dosyasını doğrudan denemek bunu çözüyor. Sanal makinede denedim, çalışıyor:

if [ -z "$MAP_BUILD" ]; then
  for i in $(seq 0 10); do
    d=$(date -u -d "-$i day" +%Y%m%d)
    curl -fsI -m 20 "$BUILD_BASE/$d.pmtiles" >/dev/null && { MAP_BUILD=$d; break; }
  done
fi

#14'teki güncelleme kontrolüne de aynı yedek yolu ekledim.

Firewall (Proxy34)

@schematrix

Copy link
Copy Markdown
Owner

Merhaba turer73, #3'ü bugün merge ettim, böylece #5'in önü açıldı. #14 ve #9 da #5'i bekliyor, yani bu PR şu an zincirin tam ortasında. Müsait olduğunda font ve sprite paketini bir commit'e ve SHA-256'ya sabitleyebilirsen kutuda deneyip ilerleyebiliriz. Proxy34'ın builds.json alınamadığında son günlerin dosyasını doğrudan deneme önerisini de eklersen çok iyi olur.


Hi turer73, I merged #3 today, so the way is clear for #5. #14 and #9 are waiting on #5 too, so this PR is right in the middle of the chain now. Whenever you have time, if you can pin the fonts and sprites archive to a commit and SHA-256, I'll test it on the box and we can move forward. It would also be great to add Proxy34's suggestion of probing recent daily files when builds.json can't be fetched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants