Hi,

On more recent versions of uDig (starting RC10 I think) this issue is fixed. Until you upgrade you will have to do a nasty reflection hack and reset the

boundsESet
and
bounds

fields.

Something like the following code should do it:

Field bounds = map.getClass().getDeclaredField("bounds");
bounds.setAccessible(true);
bounds.set( map, null );

Field boundsESet = map.getClass().getDeclaredField("boundsESet");
boundsESet.setAccessible(true);
boundsESet.set( map, false );


Then trigger a refresh and you *should* be good.

I haven't actually tried it but it should work. Otherwise move forward to RC11 and try with that version.

Jesse


On Sep 6, 2007, at 2:04 AM, 赵新元 wrote:

Hi,

I found if I change GeoResource,the udig map can't display correct map.I know the reason: the map property is not right,because I have change the GeoResource,but the map property still record the old bounds? and I found when udig exit, udig will create a *.umap file to record some information of map?
why udig can't reset the map or viewport bounds?
how can I reset its?

Thanks !


zhaoxinyuan





===============================================
快来和我一起享受TOM免费邮箱吧! 看看除了1.5G, 还有什么?

 看看女人都在聊什么? 美图尽赏 聊天世界

明星金曲免费送(http://mm.tom.com/ivr/):周杰伦 林俊 杰 庞龙 张惠妹

劲爆歌曲尽情点(http://mm.tom.com/ivr/):霍元甲 吉祥三 宝 人质 曹操

炫酷彩铃免费送(http://mm.tom.com/cailing/):周杰伦帮你 接电话 麻烦女朋友 七里香 小城故事
===============================================
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to