学习FlexViewer(二)——掌握Config文件

   FlexViewer在运行加载ViewerContainer之后,会首先通过HttpService加载config.xml文件,该文件通过ConfigManager获得ConfigXML,通过对ConfigXML的解析获得ConfigData。

     对config.xml文件的解析,获得包括全局概念的属性设置(括号内为config.xml中的节点),包括

                           proxyUrl(httpproxy)、

                           BingKey(key)、

                           geometryService的url(geometryservice)、

                           title标题(title)、subtitle(subtitle)、logo(logo)、

                           widgetLayout(widgetlayout)、

                           widgetContainer的Layout、Left、ringt、top和bottom(layout、left、right、top和bottom)等等

    map的属性包括:initial或full(initialextent/fullextent)、

                             Left、ringt、top和bottom(left、right、top和bottom)、

                             wkid(wkid)、wkt(wkt)、

                             zoomslider是否可见(zoomslidervisible)、

                             scalebar是否可见(scalebarvisible)、

                             esrilogo是否可见(esrilogovisible)、

                             lod的设置(父节点lods,子节点lod)、

                             basemap用于显示的地图服务(父basemaps子Layer)、

                             用于操作的地图服务(父operationallayers子layer)等等

   Layer的属性包括:显示标签(Label)

                              地图类型(dynamic/tiled/bing/image/wms/arcims)

                              地图服务的url(url)

   widget的属性包括:Label(label)、
                                Icon图标(icon)
                                config文件(config);

                                widget所对应的url,swf文件(url);
                                preload是否展开(preload);
                                x(x),y(y);
                                Left、ringt、top和bottom(left、right、top和bottom)等

开发者也可根据自定义,定制自己的标签。如果是全局的,需要在WidgetManager中解析,如果是和Map相关的,需要在MapManager中解析,如果和Widget相关,需要在WidgetManager中解析。

原文地址:https://www.cnblogs.com/x38160/p/3175837.html