Mercurial > hg > batmud > gmap2
changeset 15:bc9c1029266a gmap2
plussat miinuksiksi
author | jeskko |
---|---|
date | Thu, 24 Dec 2009 20:01:32 +0000 |
parents | 997bbe855e1c |
children | ec4f7f015123 |
files | js/map.js |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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; } }