Posted on 2006-04-12 12:39
Kevin Meng 阅读(314)
评论(0) 编辑 收藏
(1)doPan()函数的使用:
if(tool==ToolConstant.PANEAST){
//east
map.doPan(Map.EAST,2);
}else if(tool==ToolConstant.PANSOUTH){
//north
map.doPan(Map.SOUTH,2);
}else if(tool==ToolConstant.PANWEST){
//north
map.doPan(Map.WEST,2);
}else if(tool==ToolConstant.PANNORTH){
//north
map.doPan(Map.NORTH,2);
}
(2)如何保存全图范围:
Envelope extent =new Envelope();
extent.setMinX(map.getEnvelope().getMinX());
extent.setMinY(map.getEnvelope().getMinY());
extent.setMaxX(map.getEnvelope().getMaxX());
extent.setMaxY(map.getEnvelope().getMaxY());
request.getSession().setAttribute(
StaticConstant.SESSION_FULLEXTENT, extent);