Project

General

Profile

1
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2
<MapbuilderConfig version="0.2.1" id="contextEditorDemoConfig" 
3
      xmlns="http://mapbuilder.sourceforge.net/mapbuilder" 
4
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
5
      xsi:schemaLocation="http://mapbuilder.sourceforge.net/mapbuilder ../../lib/schemas/config.xsd">
6
  <!--
7
    Description: This configuration file determines what components from the
8
                 Mapbuilder library are to be included in a Main Mapbuilder web
9
                 page.
10
    Licence:     LGPL as per: http://www.gnu.org/copyleft/lesser.html 
11

    
12
    $Id: contextEditor.xml 3691 2007-12-06 11:19:58Z ahocevar $
13
  -->
14
  <models>
15
    <Context id="mainMap">
16
      <defaultModelUrl>../data/context/DM_Canada.xml</defaultModelUrl>
17
      <!--defaultModelUrl>../data/context/atlasWorld.xml</defaultModelUrl-->
18
      <widgets>
19
        <MapPaneOL id="mainMapWidget">
20
          <htmlTagId>mainMapPane</htmlTagId>
21
			<fixedSize>true</fixedSize>
22
        </MapPaneOL>
23
        <CursorTrack id="cursorTrack">
24
        </CursorTrack>
25
        <MapTitle id="mapTitle"/>
26
        <LayerControl id="contextLegend">
27
          <htmlTagId>workspace</htmlTagId>
28
          <outputNodeId>workspaceCanvas</outputNodeId>
29
          <legendImageEnable>/images/LegendEnable.png</legendImageEnable>
30
		  <legendImageDisable>/images/LegendDisable.png</legendImageDisable> 
31
          <moveUpImage>/images/LayerMoveUpDisable.png</moveUpImage>
32
          <moveDownImage>/images/LayerMoveDownDisable.png</moveDownImage>
33
          <deleteImage>/images/LayerRemoveDisable.png</deleteImage>
34
          <opacity>true</opacity>
35
        </LayerControl>
36
      </widgets>
37
      <tools>
38
      </tools>
39
    </Context>
40
    <Context id="locator">
41
      <defaultModelUrl>../data/context/locatorMap.xml</defaultModelUrl>
42
      <widgets>
43
        <MapPaneOL id="locatorWidget">
44
          <htmlTagId>locatorMap</htmlTagId>
45
          <targetModel>mainMap</targetModel>
46
          <mapContainerId>locatorContainer</mapContainerId>
47
			<fixedSize>true</fixedSize>
48
        </MapPaneOL>
49
      </widgets>
50
      <tools>
51
        <ZoomToAoi id="locatorZoomToAoi">
52
          <targetModel>mainMap</targetModel>
53
        </ZoomToAoi>
54
      </tools>
55
    </Context>
56
    <Model id="myMapCollection">
57
      <!--defaultModelUrl>../data/context/demoCollection.xml</defaultModelUrl-->
58
      <widgets>
59
        <CollectionList id="collectionList">
60
          <htmlTagId>workspace</htmlTagId>
61
          <outputNodeId>workspaceCanvas</outputNodeId>
62
          <targetModel>mainMap</targetModel>
63
          <title>Select a map as your base map</title>
64
        </CollectionList>
65
      </widgets>
66
    </Model>
67
    <!-- use this with a WFS capabilities model -->
68
    <WfsCapabilities id="wfsCapTemplate">
69
      <!--defaultModelUrl>http://webservices.ionicsoft.com/ionicweb/wfs/BOSTON_ORA?version=1.0.0&amp;service=WFS&amp;request=GetCapabilities</defaultModelUrl-->
70
      <models>
71
        <Model id="featureTypeTemplate" template="true">
72
          <widgets>
73
            <FilterAttributes id="attributeFilter">
74
              <htmlTagId>workspace</htmlTagId>
75
              <outputNodeId>workspaceCanvas</outputNodeId>
76
            </FilterAttributes>
77
          </widgets>
78
        </Model>
79
        <FeatureCollection id="getFeatureTemplate" template="true">
80
          <method>get</method>
81
          <widgets>
82
            <GmlRendererOL id="testGmlRenderer">
83
          <targetModel>mainMap</targetModel>
84
         </GmlRendererOL>
85
            <Legend id="wfsLegend">
86
              <htmlTagId>workspace</htmlTagId>
87
              <outputNodeId>workspaceCanvas</outputNodeId>
88
            </Legend>
89
          </widgets>
90
        </FeatureCollection>
91
        <!--Transaction id="transactionTemplate" template="true">
92
          <method>post</method>
93
          <widgets>
94
            <TransactionResponse id="transResponse"/>
95
          </widgets>
96
        </Transaction-->
97
      </models>
98
      <widgets>
99
        <SelectFeatureType id="featureTypes">
100
          <htmlTagId>workspace</htmlTagId>
101
          <outputNodeId>workspaceCanvas</outputNodeId>
102
          <toolId>wfsController</toolId>
103
        </SelectFeatureType>
104
      </widgets>
105
      <tools>
106
        <WebServiceRequest id="wfsGetFeature">
107
          <targetModel>getFeatureTemplate</targetModel>
108
          <requestName>wfs:GetFeature</requestName>
109
          <maxFeatures>20</maxFeatures>
110
        </WebServiceRequest>
111
        <WebServiceRequest id="wfsDescribeFeature">
112
          <targetModel>featureTypeTemplate</targetModel>
113
          <requestName>wfs:DescribeFeatureType</requestName>
114
        </WebServiceRequest>
115
        <!--WebServiceRequest id="wfsTransaction">
116
          <targetModel>transactionTemplate</targetModel>
117
          <requestName>wfs:Transaction</requestName>
118
        </WebServiceRequest-->
119
      </tools>
120
      <nodeSelectXpath>/wfs:WFS_Capabilities/wfs:FeatureTypeList/wfs:FeatureType</nodeSelectXpath>
121
    </WfsCapabilities>
122
    <WmsCapabilities id="wmsCapTemplate">
123
      <!--defaultModelUrl>http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp?version=1.1.1&amp;service=WMS&amp;request=GetCapabilities</defaultModelUrl-->
124
      <title>OGC Web Map Server (WMS)</title>
125
      <models>
126
        <!--GetFeatureInfo id="featureTypeTemplate" template="true">
127
          <widgets>
128
            <FilterAttributes id="attributeFilter">
129
              <outputNodeId>filterForm</outputNodeId>
130
            </FilterAttributes>
131
          </widgets>
132
        </GetFeatureInfo-->
133
        <!--GetMap id="getMapTemplate" template="true">
134
          <widgets>
135
            <MapImage id="renderMap">
136
              <targetModel>mainMap</targetModel>
137
              <htmlTagId>mainMapPane</htmlTagId>
138
              <mapContainerId>mainMapContainer</mapContainerId>
139
            </MapImage>
140
          </widgets>
141
        </GetMap-->
142
      </models>
143
      <widgets>
144
        <SelectMapLayers id="layerList">
145
          <htmlTagId>workspace</htmlTagId>
146
          <outputNodeId>workspaceCanvas</outputNodeId>
147
        </SelectMapLayers>
148
        <Loading2 id="loading3">
149
					<htmlTagId>workspace</htmlTagId>
150
					<outputNodeId>workspaceCanvas</outputNodeId>
151
        </Loading2>
152
      </widgets>
153
      <tools>
154
        <!--WebServiceRequest id="wmsController">
155
          <targetModel>getMapTemplate</targetModel>
156
          <requestName>GetMap</requestName>
157
        </WebServiceRequest-->
158
        <!--WebServiceRequest id="wmsController">
159
          <targetModel>getFeatureInfoTemplate</targetModel>
160
          <requestName>wms:GetFeatureInfo</requestName>
161
        </WebServiceRequest-->
162
        <EditContext id="editContext">
163
          <targetModel>mainMap</targetModel>
164
        </EditContext>
165
      </tools>
166
      <nodeSelectXpath>//Layer</nodeSelectXpath>
167
    </WmsCapabilities>
168
    <Model id="wmsServers">
169
      <title>Web Map Servers</title>
170
      <widgets>
171
        <WebServiceForm id="wmsServerList">
172
          <htmlTagId>workspace</htmlTagId>
173
          <outputNodeId>workspaceCanvas</outputNodeId>
174
          <stylesheet>../../lib/widget/ServiceRegistryList.xsl</stylesheet>
175
          <capabilitiesModel>wmsCapTemplate</capabilitiesModel>
176
          <serviceType>CgdiMapServices</serviceType>
177
        </WebServiceForm>
178
        <Loading2 id="loading1">
179
					<htmlTagId>workspace</htmlTagId>
180
					<outputNodeId>workspaceCanvas</outputNodeId>
181
        </Loading2>
182
      </widgets>
183
    </Model>
184
    <Model id="wfsServers">
185
      <title>Web Feature Servers</title>
186
      <widgets>
187
        <WebServiceForm id="wfsServerList">
188
          <htmlTagId>workspace</htmlTagId>
189
          <outputNodeId>workspaceCanvas</outputNodeId>
190
          <stylesheet>../../lib/widget/ServiceRegistryList.xsl</stylesheet>
191
          <capabilitiesModel>wfsCapTemplate</capabilitiesModel>
192
          <serviceType>CgdiFeatureServices</serviceType>
193
        </WebServiceForm>
194
        <Loading2 id="loading4">
195
					<htmlTagId>workspace</htmlTagId>
196
					<outputNodeId>workspaceCanvas</outputNodeId>
197
        </Loading2>
198
      </widgets>
199
    </Model>
200
    <WfsCapabilities id="owsCatSearch">
201
      <defaultModelUrl>http://devgeo.cciw.ca/cgi-bin/mapserv/owscat?version=1.0.0&amp;service=WFS&amp;request=GetCapabilities</defaultModelUrl>
202
      <nodeSelectXpath>/wfs:WFS_Capabilities/wfs:FeatureTypeList/wfs:FeatureType</nodeSelectXpath>
203
      <models>
204
        <OwsCatResources id="owsCatResults">
205
          <method>get</method>
206
          <widgets>
207
            <!--GmlRendererWZ id="resultBbox">
208
              <htmlTagId>mainMapPane</htmlTagId>
209
              <targetModel>mainMap</targetModel>
210
              <lineColor>#FF0000</lineColor>
211
              <lineWidth>2</lineWidth>
212
              <pointDiameter>10</pointDiameter>
213
              <mapContainerId>mainMapContainer</mapContainerId>
214
            </GmlRendererWZ-->
215
            <Widget id="resultList">
216
              <htmlTagId>workspace</htmlTagId>
217
              <stylesheet>OWSCatResultList.xsl</stylesheet>
218
              <outputNodeId>workspaceCanvas</outputNodeId>
219
            </Widget>
220
          </widgets>
221
          <tools>
222
            <EditContext id="addLayer">
223
              <targetModel>mainMap</targetModel>
224
            </EditContext>
225
          </tools>
226
          <nodeSelectXpath>/wfs:FeatureCollection/gml:featureMember/owscat:service_resources</nodeSelectXpath>
227
        </OwsCatResources>
228
        <Model id="filterExpression">
229
          <defaultModelUrl>OWSCatResourceFilter.xml</defaultModelUrl>
230
          <widgets>
231
            <OWSCatSearchForm id="owsCatSearchForm">
232
              <htmlTagId>workspace</htmlTagId>
233
              <outputNodeId>workspaceCanvas</outputNodeId>
234
              <targetModel>owsCatSearch</targetModel>
235
              <stylesheet>owsCatSearchForm.xsl</stylesheet>
236
              <scriptFile>OWSCatSearchForm.js</scriptFile>
237
              <mapModel>mainMap</mapModel>
238
            </OWSCatSearchForm>
239
          </widgets>
240
        </Model>
241
      </models>
242
      <widgets>
243
      </widgets>
244
      <tools>
245
        <WebServiceRequest id="owsCatGetFeature">
246
          <targetModel>owsCatResults</targetModel>
247
          <requestName>wfs:GetFeature</requestName>
248
          <requestFilter>filterExpression</requestFilter>
249
          <maxFeatures>20</maxFeatures>
250
          <debug/>
251
        </WebServiceRequest>
252
      </tools>
253
    </WfsCapabilities>
254
  </models>
255
  <widgets>
256
    <TabbedContent id="tabBar">
257
      <tab>wmsServerList</tab>
258
      <tab>layerList</tab>
259
      <tab>wfsServerList</tab>
260
      <tab>featureTypes</tab>
261
      <tab>resultList</tab>
262
    </TabbedContent>
263
    <ModelUrlInput id="urlInput">
264
      <htmlTagId>workspace</htmlTagId>
265
      <outputNodeId>workspaceCanvas</outputNodeId>
266
      <targetModel>wmsCapTemplate</targetModel>
267
    </ModelUrlInput>
268
    <ZoomIn id="zoomIn">
269
      <buttonBar>mainButtonBar</buttonBar>
270
      <targetModel>mainMap</targetModel>
271
      <class>RadioButton</class>
272
      <selected>true</selected>
273
      <enabledSrc>/images/ZoomInEnable.png</enabledSrc>
274
      <disabledSrc>/images/ZoomInDisable.png</disabledSrc>
275
    </ZoomIn>
276
    <ZoomOut id="zoomOut">
277
      <buttonBar>mainButtonBar</buttonBar>
278
      <targetModel>mainMap</targetModel>
279
      <class>RadioButton</class>
280
      <enabledSrc>/images/ZoomOutEnable.png</enabledSrc>
281
      <disabledSrc>/images/ZoomOutDisable.png</disabledSrc>
282
    </ZoomOut>
283
    <DragPan id="dragPan">
284
      <buttonBar>mainButtonBar</buttonBar>
285
      <targetModel>mainMap</targetModel>
286
      <class>RadioButton</class>
287
      <enabledSrc>/images/PanEnable.png</enabledSrc>
288
      <disabledSrc>/images/PanDisable.png</disabledSrc>
289
    </DragPan>
290
    <SetAoi id="setAoi">
291
      <buttonBar>mainButtonBar</buttonBar>
292
      <targetModel>mainMap</targetModel>
293
      <class>RadioButton</class>
294
      <enabledSrc>/images/SetAoiEnable.png</enabledSrc>
295
      <disabledSrc>/images/SetAoiDisable.png</disabledSrc>
296
    </SetAoi>
297
    <Reset id="reset">
298
      <buttonBar>mainButtonBar</buttonBar>
299
      <targetModel>mainMap</targetModel>
300
      <class>Button</class>
301
      <disabledSrc>/images/ResetExtentDisable.png</disabledSrc>
302
    </Reset>
303
    <Save id="save">
304
      <buttonBar>mainButtonBar</buttonBar>
305
      <targetModel>mainMap</targetModel>
306
      <class>Button</class>
307
      <disabledSrc>/images/SaveDisable.png</disabledSrc>
308
      <popupWindowName>modelXML</popupWindowName>
309
    </Save>
310
    <Widget id="help">
311
      <htmlTagId>workspace</htmlTagId>
312
      <outputNodeId>workspaceCanvas</outputNodeId>
313
      <stylesheet>Help.xsl</stylesheet>
314
    </Widget>
315
  </widgets>
316
  <!--
317
    All static images should be relative to this URL.
318
    This dir is relative the dir of the main html file.
319
  -->
320
	<skinDir>../../lib/skin/default</skinDir>
321
    <proxyUrl>../../MapbuilderProxy.jsp</proxyUrl>
322
</MapbuilderConfig>
(8-8/14)