Follow on from last post, to get mobac working again, create a new txt file and copy the text between the stars(*****)to it.
Name it whatever perhaps OS25K and save it with a .bsh extension (Mobac reads these) and place it in the mapsources folder within mobac.
Remembering to replace Place your key here with your own key.
Hope this helps. nb its good down to 25k maps
**********************************************************************
This method is called for each tile: input parameters for this script: “zoom”, “x” and “y”
**/
String getTileUrl( int zoom, int x, int y ) {
return “http://ak.t3.tiles.virtualearth.net/tiles/r” + encodeQuadTree(zoom, x, y) + “?g=3451&productSet=mmOS&key=Place Your Key Here”;
}
String encodeQuadTree( int zoom, int x, int y) {
char[] numChar = {‘0’, ‘1’, ‘2’, ‘3’};
char[] tileNum = new char[zoom];
for (int i = zoom – 1; i >= 0; i–) {
// Binary encoding using ones for x and twos for y. if a bit
// is set in x and y we get a three.
int num = (x % 2) | ((y % 2) << 1);
tileNum = numChar[num];
x >>= 1;
y >>= 1;
}
return new String(tileNum);
}
/**
This method is called also for each tile (implementation optional)
It allows to set HTTP headers like “Referer” or cookies the server
wants to see.
**/
void addHeaders( java.net.HttpURLConnection conn) {}
***********************************************************************