第一范文网 - 专业文章范例文档资料分享平台

基于WebGIS的信息化系统人机交互技术研究(3)

来源:用户分享 时间:2021-04-05 本文由我要当女子汉 分享 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

ComputerKnowledgeandTechnology电脑知识与技术第7卷第22期(2011年8月)

}

publicoverridevoidSaveState()

{stringmapAlias=ParamsDictionary[ActiveMapAliasKey]asstring;

Mapmap=GetMapObj(mapAlias);

if(map!=null)

{SaveZoomCenterState(map);

ManualSerializer.SaveMapXtremeObjectIntoHttpSession(MapInfo.Engine.Session.Current.Selections.DefaultSelection,"Selection");

}}

privatevoidSaveDefaultState(Mapmap)

{HttpApplicationStateapplication=HttpContext.Current.Application;

if(application["DefaultZoom"]==null)

{

application["DefaultSelection"]=ManualSerializer.BinaryStreamFromObject(MapInfo.Engine.Session.Current.Selections.De-

faultSelection);

application["DefaultCenter"]=map.Center;

application["DefaultZoom"]=map.Zoom;

}

MapInfo.Engine.Session.Current.CustomProperties["DirtyFlag"]=true;

}privatevoidRestoreDefaultState(Mapmap)

{

HttpApplicationStateapplication=HttpContext.Current.Application;

MapInfo.Engine.Session.Current.Selections.DefaultSelection=

(MapInfo.Engine.Selection)ManualSerializer.ObjectFromBinaryStream(application["DefaultSelection"]asbyte[]);

map.Zoom=(MapInfo.Geometry.Distance)application["DefaultZoom"];

map.Center=(MapInfo.Geometry.DPoint)application["DefaultCenter"];

}

#regionUtilityclassesforAppStateManagement.These,ingeneral,donot

havetochange.

privateMapGetMapObj(stringmapAlias)

{Mapmap=null;

if(mapAlias==null||mapAlias.Length<=0)

{map=MapInfo.Engine.Session.Current.MapFactory[0];

}else

{map=MapInfo.Engine.Session.Current.MapFactory[mapAlias];

if(map==null)map=MapInfo.Engine.Session.Current.MapFactory[0];

}returnmap;

}

privateboolIsDirtyMapXtremeSession()

{return(MapInfo.Engine.Session.Current.CustomProperties["DirtyFlag"]!=null);

}

privateboolIsUsersFirstTime()

{return(HttpContext.Current.Session[StateManager.GetKey("Zoom")]==null);

}

publicstaticvoidBeginRequest(System.Web.SessionState.HttpSessionStatesession,stringmapAlias)

{if(StateManager.GetStateManagerFromSession()==null)

{

StateManager.PutStateManagerInSession(newAppStateManager());

MapInfo.WebControls.MapControlModelcontrolModel=MapControlModel.GetModelFromSession();

}

StateManager.GetStateManagerFromSession().ParamsDictionary[StateManager.ActiveMapAliasKey]=mapAlias;

StateManager.GetStateManagerFromSession().RestoreState();

}publicstaticvoidEndRequest()

{

StateManager.GetStateManagerFromSession().SaveState();

}#endregion

}

2)基于MapXtreme的鹰眼技术

鹰眼是除了主视图外的一个小视图窗口,用来显示全图,并用1个矩形表示大图的地图边界。点击鹰眼窗口时,地图自动定位到相应位置,当地图视图(包括缩放比例和中心)发生变化时,鹰眼上的导航矩形框相应变化,以指示用户当前所处的位置。

鹰眼的实现思路:在同一页面表单上放置2个MapControl控件,分别为地图主窗口(mainMapControl)和鹰眼窗口(overviewMap-Control),地图主窗口用于显示实际的地图,鹰眼窗口则需要将地图按合适的比例尺显示,然后在鹰眼窗口上创建1个图层,在该图层上添加1个矩形对象FeatureGeometry,该矩形的大小随着主图边界而变化。由于两个窗口的大小不同,需要经过1次比例转换,5482计算机工程应用技术本栏目责任编辑:梁书

搜索“diyifanwen.net”或“第一范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,第一范文网,提供最新高中教育基于WebGIS的信息化系统人机交互技术研究(3)全文阅读和word下载服务。

基于WebGIS的信息化系统人机交互技术研究(3).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/wenku/1180783.html(转载请注明文章来源)
热门推荐
Copyright © 2018-2022 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top