Changeset 2247
- Timestamp:
- 07/30/10 14:32:45 (1 month ago)
- Files:
-
- sandbox/foss4g2010/src/doc/basics/dissect.rst (modified) (2 diffs)
- sandbox/foss4g2010/src/doc/basics/map.rst (modified) (2 diffs)
- sandbox/foss4g2010/src/doc/basics/map1.png (modified) (previous)
- sandbox/foss4g2010/src/doc/index.rst (modified) (2 diffs)
- sandbox/foss4g2010/src/doc/layout/index.rst (modified) (1 diff)
- sandbox/foss4g2010/src/doc/layout/layout.rst (modified) (1 diff)
- sandbox/foss4g2010/src/doc/layout/legend.rst (modified) (1 diff)
- sandbox/foss4g2010/src/doc/layout/toolbar.rst (deleted)
- sandbox/foss4g2010/src/doc/layout/tree.rst (modified) (1 diff)
- sandbox/foss4g2010/src/doc/layout/wmsbrowser.rst (modified) (1 diff)
- sandbox/foss4g2010/src/doc/wfs (added)
- sandbox/foss4g2010/src/doc/wfs/editing.png (added)
- sandbox/foss4g2010/src/doc/wfs/editing.rst (added)
- sandbox/foss4g2010/src/doc/wfs/grid.png (added)
- sandbox/foss4g2010/src/doc/wfs/grid.rst (added)
- sandbox/foss4g2010/src/doc/wfs/index.rst (added)
- sandbox/foss4g2010/src/doc/wfs/layer.png (added)
- sandbox/foss4g2010/src/doc/wfs/layer.rst (added)
- sandbox/foss4g2010/src/doc/wfs/wfst.png (added)
- sandbox/foss4g2010/src/doc/wfs/wfst.rst (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/foss4g2010/src/doc/basics/dissect.rst
r2235 r2247 114 114 items: [{ 115 115 xtype: "gx_mappanel", 116 layers: [new OpenLayers.Layer.WMS( 117 "Imagery", 118 "/geoserver/ows?", 119 {layers: "bluemarble"} 120 )] 116 layers: [new OpenLayers.Layer.WMS("Global Imagery", 117 "http://maps.opengeo.org/geowebcache/service/wms", { 118 layers: "bluemarble" 119 }, { 120 buffer: 0, 121 visibility: false 122 } 123 )], 124 extent: new OpenLayers.Bounds( 125 143.83482400000003, -43.648056, 126 148.47914100000003, -39.573891 127 ) 121 128 } 122 129 } … … 141 148 nothing else we need to configure. 142 149 150 The last property ``extent`` is here to tell the OpenLayers map to zoom to the 151 given extent when initialized. 152 143 153 .. note:: 144 154 sandbox/foss4g2010/src/doc/basics/map.rst
r2235 r2247 33 33 <head> 34 34 <title>GeoExt Map Window</title> 35 35 36 36 <script type="text/javascript" src="ext/adapter/ext/ext-base.js"></script> 37 37 <script type="text/javascript" src="ext/ext-all.js"></script> 38 38 <link rel="stylesheet" type="text/css" href="ext/resources/css/ext-all.css" /> 39 39 <script src="openlayers/lib/OpenLayers.js"></script> 40 40 41 41 <script type="text/javascript" src="geoext/lib/GeoExt.js"></script> 42 42 43 43 <script type="text/javascript"> 44 44 Ext.BLANK_IMAGE_URL = "ext/resources/images/default/s.gif"; 45 45 46 46 Ext.onReady(function() { 47 47 new Ext.Window({ … … 53 53 xtype: "gx_mappanel", 54 54 layers: [new OpenLayers.Layer.WMS( 55 "Imagery", 56 "/geoserver/ows?", 57 {layers: "bluemarble"} 58 )] 55 "Tasmania", 56 "/geoserver/wms?", 57 {layers: "tasmania"} 58 )], 59 extent: new OpenLayers.Bounds( 60 143.83482400000003, -43.648056, 61 148.47914100000003, -39.573891 62 ) 59 63 }] 60 64 }).show(); sandbox/foss4g2010/src/doc/index.rst
r2235 r2247 22 22 as User Extension such as WMSBrowser. 23 23 Put them all in a well organized interface using a ViewPort. 24 25 :ref:`geoext.features` 26 Learn how to load features from a WFS service, display them in a grid and 27 in the map, then synchronize feature selection between grid and map. 24 25 :ref:`geoext.wfs` 26 Create a WFS-T editor with a synchronized map and table view. 28 27 29 28 :ref:`geoext.editing` … … 35 34 basics/index 36 35 layout/index 37 features/index36 wfs/index 38 37 editing/index sandbox/foss4g2010/src/doc/layout/index.rst
r2235 r2247 19 19 Add a Tree to Manage the Map Layers <tree> 20 20 Create a LegendPanel <legend> 21 Organize the Application Interface Using a ViewPort <layout> 21 22 Plug a WMSBrowser <wmsbrowser> 22 Organize the Application Interface Using a ViewPort <layout>23 Add a Toolbar to the MapPanel <toolbar>sandbox/foss4g2010/src/doc/layout/layout.rst
r2235 r2247 4 4 =================================================== 5 5 6 .. code-block:: javascript 7 8 Ext.onReady(function() { 9 var layers = [ 10 new OpenLayers.Layer.WMS("Global Imagery", 11 "http://maps.opengeo.org/geowebcache/service/wms", { 12 layers: "bluemarble" 13 }, { 14 buffer: 0, 15 visibility: false 16 } 17 ), 18 new OpenLayers.Layer.WMS("Tasmania State Boundaries", 19 "/geoserver/wms", { 20 layers: "topp:tasmania_state_boundaries" 21 }, { 22 buffer: 0 23 } 24 ), 25 new OpenLayers.Layer.WMS("Water", 26 "/geoserver/wms", { 27 layers: "topp:tasmania_water_bodies", 28 transparent: true, 29 format: "image/gif" 30 }, { 31 isBaseLayer: false, 32 buffer: 0 33 } 34 ), 35 new OpenLayers.Layer.WMS("Cities", 36 "/geoserver/wms", { 37 layers: "topp:tasmania_cities", 38 transparent: true, 39 format: "image/gif" 40 }, { 41 isBaseLayer: false, 42 buffer: 0 43 } 44 ), 45 new OpenLayers.Layer.WMS("Tasmania Roads", 46 "/geoserver/wms", { 47 layers: "topp:tasmania_roads", 48 transparent: true, 49 format: "image/gif" 50 }, { 51 isBaseLayer: false, 52 buffer: 0 53 } 54 ), 55 // create a group layer (with several layers in the "layers" param) 56 // to show how the LayerParamLoader works 57 new OpenLayers.Layer.WMS("Tasmania (Group Layer)", 58 "/geoserver/wms", { 59 layers: [ 60 "topp:tasmania_state_boundaries", 61 "topp:tasmania_water_bodies", 62 "topp:tasmania_cities", 63 "topp:tasmania_roads" 64 ], 65 transparent: true, 66 format: "image/gif" 67 }, { 68 isBaseLayer: false, 69 buffer: 0, 70 // exclude this layer from layer container nodes 71 displayInLayerSwitcher: false, 72 visibility: false 73 } 74 ) 75 ]; 76 77 var mappanel = new GeoExt.MapPanel({ 78 extent: new OpenLayers.Bounds( 79 143.83482400000003, -43.648056, 80 148.47914100000003, -39.573891 81 ), 82 map: new OpenLayers.Map({allOverlays: false}), 83 layers: layers, 84 region: 'center' 85 }); 86 87 new Ext.Viewport({ 88 layout: 'border', 89 items: [mappanel] 90 }); 91 }); 92 93 .. code-block:: javascript 94 95 { 96 xtype: 'tabpanel', 97 region: 'west', 98 width: 250 99 } 100 101 102 .. code-block:: javascript 103 104 activeTab: 0, 105 items: [tree] 106 107 .. note:: 108 109 Don't forget to add a title to the tree panel. 110 Also no need to render the panel, the rendering will be done by Ext while doing the layout. 111 112 Repeat the same operation for legendPanel. You should now have a column on the left with two tabs. 113 114 .. code-block:: javascript 115 sandbox/foss4g2010/src/doc/layout/legend.rst
r2235 r2247 3 3 Create a LegendPanel 4 4 ==================== 5 6 .. code-block:: javascript 7 8 var legendPanel = new GeoExt.LegendPanel({ 9 defaults: { 10 labelCls: 'mylabel', 11 style: 'padding:5px' 12 }, 13 bodyStyle: 'padding:5px' 14 }); 15 legendPanel.render(document.body); sandbox/foss4g2010/src/doc/layout/tree.rst
r2235 r2247 3 3 Add a Tree to Manage the Map Layers 4 4 =================================== 5 6 We want several layers: base and overlay layers. 7 Modify the ``layers`` array to match the following. 8 9 .. code-block:: javascript 10 11 var layers = [ 12 new OpenLayers.Layer.WMS("Global Imagery", 13 "http://maps.opengeo.org/geowebcache/service/wms", { 14 layers: "bluemarble" 15 }, { 16 buffer: 0, 17 visibility: false 18 } 19 ), 20 new OpenLayers.Layer.WMS("Tasmania State Boundaries", 21 "/geoserver/wms", { 22 layers: "topp:tasmania_state_boundaries" 23 }, { 24 buffer: 0 25 } 26 ), 27 new OpenLayers.Layer.WMS("Water", 28 "/geoserver/wms", { 29 layers: "topp:tasmania_water_bodies", 30 transparent: true, 31 format: "image/gif" 32 }, { 33 isBaseLayer: false, 34 buffer: 0 35 } 36 ), 37 new OpenLayers.Layer.WMS("Cities", 38 "/geoserver/wms", { 39 layers: "topp:tasmania_cities", 40 transparent: true, 41 format: "image/gif" 42 }, { 43 isBaseLayer: false, 44 buffer: 0 45 } 46 ), 47 new OpenLayers.Layer.WMS("Tasmania Roads", 48 "/geoserver/wms", { 49 layers: "topp:tasmania_roads", 50 transparent: true, 51 format: "image/gif" 52 }, { 53 isBaseLayer: false, 54 buffer: 0 55 } 56 ), 57 // create a group layer (with several layers in the "layers" param) 58 // to show how the LayerParamLoader works 59 new OpenLayers.Layer.WMS("Tasmania (Group Layer)", 60 "/geoserver/wms", { 61 layers: [ 62 "topp:tasmania_state_boundaries", 63 "topp:tasmania_water_bodies", 64 "topp:tasmania_cities", 65 "topp:tasmania_roads" 66 ], 67 transparent: true, 68 format: "image/gif" 69 }, { 70 isBaseLayer: false, 71 buffer: 0, 72 // exclude this layer from layer container nodes 73 displayInLayerSwitcher: false, 74 visibility: false 75 } 76 ) 77 ]; 78 79 Also, since we don't want all layers to be considered as overlays we need to set 80 options for our map. 81 Add the following to your `GeoExt.MapPanel` configuration object: 82 83 .. code-block:: javascript 84 85 map: new OpenLayers.Map({allOverlays: false}) 86 87 .. code-block:: javascript 88 89 var treeConfig = [{ 90 nodeType: "gx_baselayercontainer" 91 }, { 92 nodeType: "gx_overlaylayercontainer", 93 expanded: true 94 }, { 95 nodeType: "gx_layer", 96 layer: "Tasmania (Group Layer)", 97 isLeaf: false, 98 // create subnodes for the layers in the LAYERS param. If we assign 99 // a loader to a LayerNode and do not provide a loader class, a 100 // LayerParamLoader will be assumed. 101 loader: { 102 param: "LAYERS" 103 } 104 }]; 105 var tree = new Ext.tree.TreePanel({ 106 border: false, 107 loader: new Ext.tree.TreeLoader({ 108 applyLoader: false 109 }), 110 root: { 111 nodeType: "async", 112 children: treeConfig 113 }, 114 rootVisible: false 115 }); 116 tree.render(document.body); 117 118 Don't forget to add a title to the tree panel 119 120 121 sandbox/foss4g2010/src/doc/layout/wmsbrowser.rst
r2235 r2247 4 4 ================= 5 5 6 7 8 .. code-block:: javascript 9 10 11