论坛首页 AJAX版 GWT

如何在做的地图上加标记以及放大缩小地图

浏览 240 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
时间:2008-03-03
我用GWT做了个简单的地图 是用image做的 这样
public void fillMapGridmin(){

for(int i = 0 ;i < 1 ; i++){
for(int j = 0 ;j < 1 ; j++){
/**
* 将地图(图片)上的默认浏览器行为除去。
*/
Image image = new Image(){
/**
* 这个部分必须紧跟在实例化过程的后面,不然就不起作用,没有在官方文档里找到原因。
*/
public void onBrowserEvent (Event event)
{
DOM.eventPreventDefault(event);
super.onBrowserEvent(event);
}

};

image.setUrl("images/min/1_" + i + "_" + j + ".JPG");
image.setPixelSize(256, 256); //图像块的大小
mapGridmin.setWidget(i, j, image);
centerLeft = (int) ((areaWidth - this.imageWidth) * showPositionLeftRatio);
centerTop = (int) ((areaHeight - this.imageHeight) * showPositionTopRatio);
}
}
}
用这种方式建的,现在就是我如何在地图上加标记和实现它的放大缩小功能呢?????请教
   
论坛首页 AJAX版 GWT

跳转论坛:
JavaEye推荐
    快速回复 引用上一条消息 (Alt+S)