arcims+java 清除高亮失败 请高手帮忙看看

yong427 2008-06-11 09:39:36
清除高亮失败
代码如下:
//获得我的Map对象,放置于Session中
if (this.request.getSession().getAttribute("MainMap") != null)
{
this.setMap((Map) this.request.getSession().getAttribute(
"MainMap"));
}
//将Acetate和HighlightLayer图层remove掉
for (int i = 0; i < this.getMap().getLayers().getCount(); i++)
{
if (this.getMap().getLayers().item(i).getType() == "Acetate"
|| this.getMap().getLayers().item(i).getName() == "HighlightLayer")
{
//this.getMap().getLayers().item(i).setVisible(false);
this.getMap().getLayers().remove(i);
i --;
}
}
//刷新
this.getMap().refresh();
this.setMapUrl(map.getMapOutput().getURL());
this.setLegendMapUrl(map.getLegend().getLegendOutput().getURL());

结果是图刷了下,但是 Acetate和HighlightLayer中的结果还是显示的,并未删除掉
不知道为什么

我跟踪了下,

this.getMap().refresh();
这句执行之前 this.getMap().getLayers()里已经没有 Acetate和HighlightLayer图层 了,但显示的时候还是有的
...全文
67 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
添加是用 图层.getThemeList().add
CathySun118 2008-06-14
  • 打赏
  • 举报
回复
这么奇怪!

2,142

社区成员

发帖
与我相关
我的任务
社区描述
它是一种特定的十分重要的空间信息系统。它是在计算机硬、软件系统支持下,对整个或部分地球表层(包括大气层)空间中的有关地理分布数据进行采集、储存、管理、运算、分析、显示和描述的技术系统。
社区管理员
  • 地理信息系统
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧