通常使用的下面代碼不能夠清除高亮的點層圖形
WebQuery pWebQuery = (WebQuery)webMap.getWebContext().getAttribute("query");
pWebQuery.clearGraphics();
因為實際上高亮的處理ADF是通過新添加一個圖層來實現的,WebGraphics實際上就是控制這個圖層.
WebGraphics graphics = webMap.getWebContext().getWebGraphics();
graphics.clearGraphics();//這樣就能夠正確清除所有高亮的元素了
轉載于: http://leo43.blog.hexun.com/p9/default.aspx
WebQuery pWebQuery = (WebQuery)webMap.getWebContext().getAttribute("query");
pWebQuery.clearGraphics();
因為實際上高亮的處理ADF是通過新添加一個圖層來實現的,WebGraphics實際上就是控制這個圖層.
WebGraphics graphics = webMap.getWebContext().getWebGraphics();
graphics.clearGraphics();//這樣就能夠正確清除所有高亮的元素了
轉載于: http://leo43.blog.hexun.com/p9/default.aspx