# HG changeset patch # User jeskko # Date 1261684892 0 # Node ID bc9c1029266a2e43137b0f23826fba3b0095059e # Parent 997bbe855e1ca301586d6444781bab417b00b239 plussat miinuksiksi diff -r 997bbe855e1c -r bc9c1029266a js/map.js --- a/js/map.js Thu Sep 24 16:43:44 2009 +0000 +++ b/js/map.js Thu Dec 24 20:01:32 2009 +0000 @@ -3,7 +3,7 @@ map.enableContinuousZoom(); map.enableScrollWheelZoom(); -map.addControl(new GSmallZoomControl3D()); +map.addControl(new GLargeMapControl3D()); var copyright = new GCopyright(1, new GLatLngBounds(new GLatLng(-90, -180), @@ -21,9 +21,9 @@ var custommap = new GMapType(tl, new GMercatorProjection(12),"BatMud", {errorMessage:"No data available"}); map.addMapType(custommap); -map.setCenter(new GLatLng(-20.2828,16.0620),3,custommap); +var proj=map.getCurrentMapType().getProjection(); +map.setCenter(proj.fromPixelToLatLng(new GPoint(8556,8664),6),3,custommap); -var proj=map.getCurrentMapType().getProjection(); function checkCoords(cx, cy, cxmin, cymin, cxmax, cymax, cname) { if (cx > cxmin && cx < cxmax && cy > cymin && cy < cymax) { @@ -56,8 +56,8 @@ var c = continents[i]; if (tx > c[1] && tx < c[3] && ty > c[2] && ty < c[4]) { cont = c[0]; - xx = tx + c[1]; - yy = ty + c[2]; + xx = tx - c[1]; + yy = ty - c[2]; break; } }