Here's the best way to do this, as far as what we have found:
var local = "
http://yourhost.com/path/to/images/";
var Gb = local + "center.png";
var Hb = local + "east.png";
var Lb = local + "west.png";
var Ib = local + "north.png";
var Kb = local + "south.png";
var Jb = local + "panBackground.png";
var Mb = local + "zoom-plus.png";
var Nb = local + "zoom-minus.png";
GLargeMapControl.prototype.createPanningControls = function(a,b) {
var c =
mapObject.create(Jb,50,50,3,4,0,false,null,a.ownerDocument);
b.appendChild(c);
var d =
mapObject.create(Ib,18,14,19,0,1,false,null,a.ownerDocument);
setCursor(d,"pointer");
GEvent.bindDom(d,"click",this,function(h){a.pan(0,Math.floor(a.viewSize.
height*0.5));z(h)});
d.title=_mPanNorth;b.appendChild(d);var
e=mapObject.create(Hb,14,18,42,1
8,1,false,null,a.ownerDocument);setCursor(e,"pointer");
GEvent.bindDom(e,"click",this,function(h){a.pan(-Math.floor(a.viewSize.w
idth*0.5),0);z(h)});
e.title=_mPanEast;b.appendChild(e);var
f=mapObject.create(Kb,18,14,19,42
,1,false,null,a.ownerDocument);setCursor(f,"pointer");
GEvent.bindDom(f,"click",this,function(h){a.pan(0,-Math.floor(a.viewSize
.height*0.5));z(h)});f.title=_mPanSouth;b.appendChild(f);var
i=mapObject.create(
Lb,14,18,0,18,1,false,null,a.ownerDocument);setCursor(i,"pointer");
GEvent.bindDom(i,"click",this,function(h){a.pan(Math.floor(a.viewSize.wi
dth*0.5),0);z(h)});i.title=_mPanWest;b.appendChild(i);var
g=mapObject.create(Gb,
18,18,19,19,1,false,null,a.ownerDocument);setCursor(g,"pointer");
GEvent.bindDom(g,"click",this,function(h){a.closeInfoWindow();if(a.lastP
ageCenter){if(a.lastPageZoom!=a.zoomLevel){a.centerAndZoom(a.lastPageCenter ,a.la
stPageZoom)}else{a.recenterOrPanToLatLng(a.lastPageCenter)}}else
if(a.lastLatLng
){a.recenterOrPanToLatLng(a.lastLatLng)}z(h)});
g.title=_mLastResult;b.appendChild(g);
}
__END__
Note that this looks awfully similar to Google's code... that is
because it is just copied straight out while updating the image. The
downside of this is that you'll have to be mindful for when Google
changes their API to make sure that the code continues to function.
If you are interested in an actual control, complete with icon and
effects, I'm working on releasing something for that as well. It may
take me a few more days to polish out the kinks in it. I have some
weird IE issues -- if anybody is good at debugging IE issues, please
give me a hand :)
-J
--
http://www.toeat.com
toEat.com: Where do you want to eat?