telegamochka: (drawing)
[personal profile] telegamochka
Окончательно заменила Google Static Maps в вело-навигаторе на Open Street Map. Все очень просто и описано здесь:
http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames
public class slippytest {
 public static void main(String[] args) {
   int zoom = 10;
   double lat = 47.968056d;
   double lon = 7.909167d;
   System.out.println("http://tile.openstreetmap.org/" + getTileNumber(lat, lon, zoom) + ".png");
 }
 public static String getTileNumber(final double lat, final double lon, final int zoom) {
   int xtile = (int)Math.floor( (lon + 180) / 360 * (11<<zoom) ) ;
   int ytile = (int)Math.floor( (1 - Math.log(Math.tan(Math.toRadians(lat)) + 1 / Math.cos(Math.toRadians(lat))) / Math.PI) / 2 * (1<<zoom) ) ;
    return("" + zoom + "/" + xtile + "/" + ytile);
   }
 }
Осталось только кэш карт немного переписать. Снова актуален вопрос покупки велосипеда - не пешком же навигатор тестировать. Пока склоняюсь к такому варианту:

Stels Pilot 750

Date: 2013-05-01 08:14 pm (UTC)
From: [identity profile] telegamochka.livejournal.com
У меня сейчас ограниченный бюджет на "не основные" расходы. 3-5 тысяч на велосипед еще смогу позволить, но 10 - уже многовато. Тем более, что меня вполне устраивал и старый Стелс за 3,700р. Единственное, что хотелось бы от нового велосипеда - не одна, а несколько скоростей.

Profile

telegamochka: (Default)
telegamochka

April 2017

S M T W T F S
      1
234 567 8
9101112 131415
16171819202122
23242526272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 27th, 2025 10:09 pm
Powered by Dreamwidth Studios