Ticket #497: Add_gx_mappanel,_add_titles,_some_fixes,_remove_setCenter,_addLayers.patch

File Add_gx_mappanel,_add_titles,_some_fixes,_remove_setCenter,_addLayers.patch, 32.9 kB (added by cmoullet, 3 years ago)
  • MapFish/client/examples/print/basic.html

     
    1515        src="../../mfbase/ext/adapter/ext/ext-base.js"></script> 
    1616<script type="text/javascript" src="../../mfbase/ext/ext-all-debug.js"></script> 
    1717 
     18<script type="text/javascript" src="../../mfbase/geoext/lib/GeoExt.js"></script> 
     19 
    1820<script type="text/javascript"> 
    1921  // Because of a bug in Firefox 2 we need to specify the MapFish base path. 
    2022  // See https://bugzilla.mozilla.org/show_bug.cgi?id=351282 
     
    4244 
    4345    var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", 
    4446            "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}, {buffer: 0}); 
    45     map.addLayers([wms]); 
    4647 
    4748    var layerOverrides={ 
    4849        "OpenLayers WMS": {overview: true} 
     
    6667        new Ext.BoxComponent({ // raw 
    6768          region: 'north', 
    6869          el: 'north', 
    69           height: 32 
     70          height: 32, 
     71          margins: {left: 5,top: 5} 
    7072        }), 
    7173        { 
    7274          region: 'west', 
     
    124126            region: 'center', 
    125127            title: 'Map', 
    126128            layout: 'fit', 
    127             xtype: 'mapcomponent', 
     129            xtype: 'gx_mappanel', 
    128130            map: map, 
    129             tbar: toolbar 
     131            layers: [wms], 
     132            tbar: toolbar, 
     133            zoom: 3, 
     134            center:new OpenLayers.LonLat(8.5, 0) 
    130135        }] 
    131136    }); 
    132  
    133     map.setCenter(new OpenLayers.LonLat(8.5, 0), 3); 
    134137  }); 
    135138</script> 
    136139</head> 
    137140<body> 
    138141  <div id="west"></div> 
    139   <div id="north"> 
    140     <p style="font-size:14pt" align="center">MapFish printer</p> 
     142   <div id="north"> 
     143    <p style="font-size:16pt;color:#15428B;font-weight:bold">MapFish example: print</p> 
    141144  </div> 
    142145  <div id="center"></div> 
    143146</body> 
  • MapFish/client/examples/geostat/choropleths.html

     
    7676    </style> 
    7777  </head> 
    7878  <body> 
    79     <h1 class="page-title">Choropleths Example</h1> 
    80  
     79  <div id="north"> 
     80    <p style="font-size:16pt;color:#15428B;font-weight:bold">MapFish example: chloropleths</p> 
     81  </div> 
    8182    <div id="content"> 
    8283      <div id="right"> 
    8384        <div id="myChoroplethDiv"></div> 
  • MapFish/client/examples/tree/tree_automatic.html

     
    6666  </head> 
    6767 
    6868  <body> 
     69    <div id="north"> 
     70       <p style="font-size:16pt;color:#15428B;font-weight:bold">MapFish example: automatically generated tree</p> 
     71    </div> 
    6972    <div id="right"> 
    7073      <div id="tree"></div> 
    7174    </div> 
  • MapFish/client/examples/print/simple.html

     
    1717        src="../../mfbase/ext/adapter/ext/ext-base.js"></script> 
    1818<script type="text/javascript" src="../../mfbase/ext/ext-all-debug.js"></script> 
    1919 
     20<script type="text/javascript" src="../../mfbase/geoext/lib/GeoExt.js"></script> 
     21 
    2022<script type="text/javascript"> 
    2123  // Because of a bug in Firefox 2 we need to specify the MapFish base path. 
    2224  // See https://bugzilla.mozilla.org/show_bug.cgi?id=351282 
     
    4547 
    4648    var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", 
    4749            "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}, {buffer: 0}); 
    48     map.addLayers([wms]); 
    4950 
    5051    var summits = new OpenLayers.Layer.WMS("Summits", 
    5152            "http://demo.mapfish.org/mapfishsample/trunk/wms?", 
     
    9495        new Ext.BoxComponent({ // raw 
    9596          region: 'north', 
    9697          el: 'north', 
    97           height: 32 
     98          height: 32, 
     99          margins: {left: 5,top: 5} 
    98100        }), 
    99101        { 
    100102          region: 'west', 
     
    195197            region: 'center', 
    196198            title: 'Map', 
    197199            layout: 'fit', 
    198             xtype: 'mapcomponent', 
     200            xtype: 'gx_mappanel', 
     201            layers: [wms], 
    199202            map: map, 
    200             tbar: toolbar 
     203            tbar: toolbar, 
     204            zoom: 3, 
     205            center:new OpenLayers.LonLat(8.5, 0)  
    201206        }] 
    202207    }); 
    203208 
    204     map.setCenter(new OpenLayers.LonLat(8.5, 0), 3); 
    205209  }); 
    206210</script> 
    207211</head> 
    208212<body> 
    209213  <div id="west"></div> 
    210214  <div id="north"> 
    211     <p style="font-size:14pt" align="center">MapFish printer</p> 
     215    <p style="font-size:16pt;color:#15428B;font-weight:bold">MapFish example: advanced print</p> 
    212216  </div> 
    213217  <div id="center"></div> 
    214218  <div id="help"> 
  • MapFish/client/examples/tree/tree_standalone.html

     
    8787  </head> 
    8888 
    8989  <body> 
     90    <div id="north"> 
     91       <p style="font-size:16pt;color:#15428B;font-weight:bold">MapFish example: standalone tree</p> 
     92    </div> 
    9093    <div id="tree"></div> 
    9194 
    9295    <div> 
  • MapFish/client/examples/map/toolbar.html

     
    1111    <script type="text/javascript" src="../../mfbase/ext/adapter/ext/ext-base.js"></script> 
    1212    <script type="text/javascript" src="../../mfbase/ext/ext-all.js"></script> 
    1313 
     14     <script type="text/javascript" src="../../mfbase/geoext/lib/GeoExt.js"></script> 
     15 
    1416    <script type="text/javascript"> 
    1517      // Because of a bug in Firefox 2 we need to specify the MapFish base path. 
    1618      // See https://bugzilla.mozilla.org/show_bug.cgi?id=351282 
     
    99101                    new Ext.BoxComponent({ 
    100102                        region: 'north', 
    101103                        el: 'north', 
    102                         height: 60 
     104                        height: 32, 
     105                        margins: {left: 5,top: 5} 
    103106                    }), { 
    104107                        region: 'west', 
    105108                        title: 'LayerTree', 
     
    123126                        border: true, 
    124127                        margins: '5 5 0 0', 
    125128                        items: [{ 
    126                             xtype: 'mapcomponent', 
     129                            xtype: 'gx_mappanel', 
    127130                            map: map, 
    128131                            tbar: toolbar, 
    129                             border: false 
     132                            border: false, 
     133                            center: new OpenLayers.LonLat(5,45), 
     134                            zoom: 6 
    130135                        }] 
    131136                    },{ 
    132137                        region: 'south', 
     
    306311                createToolbar(); 
    307312                createViewport(); 
    308313                 
    309                 map.setCenter(new OpenLayers.LonLat(5,45), 6); 
    310                  
    311314                setToolbarContent(); 
    312315                toolbar.activate(); 
    313316                 
    314317                // display some text in the status bar: 
    315                 this.setStatus('Status: example app ready'); 
     318                this.setStatus('Status: information'); 
    316319            } 
    317320        }; 
    318321    }(); // end of app 
     
    327330        .clear-left { 
    328331          clear: left; 
    329332        } 
    330         #north { 
    331             // uncomment this line to insert a banner : 
    332             /*background:transparent url(images/banner.jpg) repeat-x scroll 0 0;*/ 
    333         } 
    334333     </style> 
    335334  </head> 
    336335 
    337336  <body> 
    338     <div id="north">your banner here</div> 
     337    <div id="north"> 
     338       <p style="font-size:16pt;color:#15428B;font-weight:bold">MapFish example: map with toolbar</p> 
     339    </div> 
    339340    <div id="mymap"></div> 
    340341  </body> 
    341342</html> 
  • MapFish/client/examples/shortcuts/shortcuts.html

     
    4848 
    4949        map.addLayers([wms]); 
    5050        map.addControl(new OpenLayers.Control.LayerSwitcher()); 
    51         map.setCenter(new OpenLayers.LonLat(17, 2), 2); 
     51        map. setCenter(new OpenLayers.LonLat(17, 2), 2); 
    5252     
    5353        var store = new Ext.data.SimpleStore({ 
    5454            fields: ['value', 'text', 'bbox'], 
  • MapFish/client/examples/map/multiple_maps.html

     
    7070    </script> 
    7171       
    7272    <style type="text/css"> 
    73         .map, .mapContainer, #firstMap, #secondMap { 
     73        .map, #firstMap, #secondMap { 
    7474           width: 300px; 
    7575           height: 200px; 
    7676           border: 1px solid #999; 
     
    8282        .x-panel-body { 
    8383          border: none !important; 
    8484        } 
     85        #north { 
     86           margin-top:5px; 
     87           margin-left:5px; 
     88        } 
    8589    </style> 
    8690  </head> 
    8791 
    8892  <body> 
     93    <div id="north"> 
     94       <p style="font-size:16pt;color:#15428B;font-weight:bold">MapFish example: multiple maps</p> 
     95    </div> 
     96    <br> 
    8997    <div id="firstMap" class="map"></div> 
    9098    <div id="firstTree" class="tree"></div> 
    9199 
  • MapFish/client/examples/map/layout_spherical_mercator.html

     
    1010    <script type="text/javascript" src="../../mfbase/ext/adapter/ext/ext-base.js"></script> 
    1111    <script type="text/javascript" src="../../mfbase/ext/ext-all-debug.js"></script> 
    1212 
     13    <script type="text/javascript" src="../../mfbase/geoext/lib/GeoExt.js"></script> 
     14 
    1315    <script type="text/javascript"> 
    1416      // Because of a bug in Firefox 2 we need to specify the MapFish base path. 
    1517      // See https://bugzilla.mozilla.org/show_bug.cgi?id=351282 
     
    4648            maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 
    4749                                             20037508, 20037508.34) 
    4850        }; 
    49         map = new OpenLayers.Map('center', options); 
     51        map = new OpenLayers.Map(options); 
    5052 
    5153        // create Google Mercator layers 
    5254        var gmap = new OpenLayers.Layer.Google( 
     
    7779                displayOutsideMaxExtent: true 
    7880            } 
    7981        ); 
    80  
    81         map.addLayers([gmap, yahoo, yahoosat, yahoohyb, mapnik]); 
    82                             
    83         map.setCenter(new OpenLayers.LonLat(17, 2), 2); 
    84  
    85          
    86         var mapcomponent = new mapfish.widgets.MapComponent({map: map}); 
    87         
     82        
    8883        var viewport = new Ext.Viewport({ 
    8984            layout:'border', 
    9085            items:[ 
    9186                new Ext.BoxComponent({ // raw 
    9287                    region: 'north', 
    9388                    el: 'north', 
    94                     height: 32 
     89                    height: 32, 
     90                    margins: {left: 5,top: 5} 
    9591                }),{ 
    9692                    region: 'south', 
    9793                    contentEl: 'south', 
     
    132128                    region: 'center', 
    133129                    title: 'Map', 
    134130                    layout: 'fit', 
    135                     items: mapcomponent 
     131                    xtype: 'gx_mappanel', 
     132                    layers: [gmap, yahoo, yahoosat, yahoohyb, mapnik], 
     133                    map: map 
    136134                } 
    137135             ] 
    138136        }); 
     
    157155</head> 
    158156<body> 
    159157  <div id="north"> 
    160     <p>MapFish</p> 
     158    <p style="font-size:16pt;color:#15428B;font-weight:bold">MapFish example: usage of maps in spherical mercator</p> 
    161159  </div> 
    162160  <div id="center"> 
    163161  </div> 
    164162  <div id="south"> 
    165     <p>south - generally for informational stuff, also could be for status bar</p> 
     163    <p></p> 
    166164  </div> 
    167165 
    168166 </body> 
  • MapFish/client/examples/map/layout.html

     
    1010    <script type="text/javascript" src="../../mfbase/ext/adapter/ext/ext-base.js"></script> 
    1111    <script type="text/javascript" src="../../mfbase/ext/ext-all-debug.js"></script> 
    1212 
     13    <script type="text/javascript" src="../../mfbase/geoext/lib/GeoExt.js"></script> 
     14 
    1315    <script type="text/javascript"> 
    1416      // Because of a bug in Firefox 2 we need to specify the MapFish base path. 
    1517      // See https://bugzilla.mozilla.org/show_bug.cgi?id=351282 
     
    3537   
    3638    Ext.onReady(function() { 
    3739         
    38         var map = new OpenLayers.Map($('center')); 
     40        var map = new OpenLayers.Map(); 
    3941 
    4042        var wms = new OpenLayers.Layer.WMS("OpenLayers WMS",  
    4143            "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}, {buffer: 0}); 
    4244 
    43         map.addLayers([wms]); 
    4445        map.addControl(new OpenLayers.Control.LayerSwitcher()); 
    45         map.setCenter(new OpenLayers.LonLat(17, 2), 2); 
    4646 
    4747        var viewport = new Ext.Viewport({ 
    4848            layout:'border', 
     
    5050                new Ext.BoxComponent({ // raw 
    5151                    region: 'north', 
    5252                    el: 'north', 
    53                     height: 32 
     53                    height: 32, 
     54                    margins: {left: 5,top: 5} 
    5455                }),{ 
    5556                    region: 'south', 
    5657                    contentEl: 'south', 
     
    103104                    region: 'center', 
    104105                    title: 'Map', 
    105106                    layout: 'fit', 
    106                     xtype: 'mapcomponent', 
     107                    xtype: 'gx_mappanel', 
     108                    layers: [wms], 
    107109                    map: map 
    108110                } 
    109111             ] 
     
    114116<body> 
    115117  <div id="west"></div> 
    116118  <div id="north"> 
    117     <p>MapFish</p> 
     119    <p style="font-size:16pt;color:#15428B;font-weight:bold">MapFish example: map in complex layout</p> 
    118120  </div> 
    119   <div id="center"></div> 
    120121  <div id="south"> 
    121     <p>south - generally for informational stuff, also could be for status bar</p> 
     122    <p></p> 
    122123  </div> 
    123124 
    124125 </body> 
  • MapFish/client/examples/map/window.html

     
    99    <script type="text/javascript" src="../../mfbase/ext/adapter/ext/ext-base.js"></script> 
    1010    <script type="text/javascript" src="../../mfbase/ext/ext-all-debug.js"></script> 
    1111 
     12    <script type="text/javascript" src="../../mfbase/geoext/lib/GeoExt.js"></script> 
     13 
    1214    <script type="text/javascript"> 
    1315      // Because of a bug in Firefox 2 we need to specify the MapFish base path. 
    1416      // See https://bugzilla.mozilla.org/show_bug.cgi?id=351282 
     
    3436   
    3537    Ext.onReady(function(){ 
    3638         
    37         var map = new OpenLayers.Map('olmap'); 
     39        var map = new OpenLayers.Map(); 
    3840 
    3941        var wms = new OpenLayers.Layer.WMS("OpenLayers WMS",  
    4042            "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}, {buffer: 0}); 
    4143 
    42         map.addLayers([wms]); 
    4344        map.addControl(new OpenLayers.Control.LayerSwitcher()); 
    44         map.setCenter(new OpenLayers.LonLat(17, 2), 2); 
    4545             
    4646        var window = new Ext.Window({ 
    4747            title: 'Map', 
     
    5353            plain: true, 
    5454            bodyStyle: 'padding:5px;', 
    5555            items: [{ 
    56                 xtype: 'mapcomponent', 
    57                 map: map 
     56                xtype: 'gx_mappanel', 
     57                map: map, 
     58                layers: [wms] 
    5859            }] 
    5960        }); 
    6061        window.show(); 
     
    100101      body element must not start with text to prevent IE bug 
    101102      http://extjs.com/forum/showthread.php?t=7912&highlight=createRange 
    102103  --> 
    103   <h1>MapFish example</h1> 
    104   This example shows how to use the MapComponent class to integrate a OL map into a window layout. 
    105   <div id="olmap"> 
     104  <div id="north"> 
     105    <p style="font-size:16pt;color:#15428B;font-weight:bold">MapFish example: simple map in complex layout</p> 
    106106  </div> 
     107  </div> 
    107108 
    108109 </body> 
    109110</html> 
  • MapFish/client/examples/search/c2corg.html

     
    88    <script type="text/javascript" src="../../mfbase/openlayers/lib/OpenLayers.js"></script> 
    99 
    1010    <script type="text/javascript" src="../../mfbase/ext/adapter/ext/ext-base.js"></script> 
    11     <script type="text/javascript" src="../../mfbase/ext/ext-all-debug.js"></script> 
    12                      
    13  
     11    <script type="text/javascript" src="../../mfbase/ext/ext-all-debug.js"></script>                 
     12 
    1413    <script type="text/javascript"> 
    1514      // Because of a bug in Firefox 2 we need to specify the MapFish base path. 
    1615      // See https://bugzilla.mozilla.org/show_bug.cgi?id=351282 
     
    163162  </head> 
    164163 
    165164  <body> 
    166     <h1 class="page-title">Search Example</h1> 
     165 
     166    <div id="north"> 
     167      <p style="font-size:16pt;color:#15428B;font-weight:bold">MapFish example: search</p> 
     168    </div> 
    167169    <div id="content"> 
    168170      <div id="map" class="float-left"></div> 
    169171      <div class="float-left"> 
  • MapFish/client/examples/tree/tree_radio.html

     
    140140  </head> 
    141141 
    142142  <body> 
     143    <div id="north"> 
     144       <p style="font-size:16pt;color:#15428B;font-weight:bold">MapFish example: tree with radio button</p> 
     145    </div> 
    143146    <div id="right"> 
    144147      <div id="tree"></div> 
    145148    </div> 
  • MapFish/client/examples/tree/tree_user_model.html

     
    9898  </head> 
    9999 
    100100  <body> 
     101    <div id="north"> 
     102       <p style="font-size:16pt;color:#15428B;font-weight:bold">MapFish example: custom tree</p> 
     103    </div> 
    101104    <div id="right"> 
    102105      <div id="tree"></div> 
    103106    </div> 
  • MapFish/client/examples/tree/tree_user_model_complex.html

     
    170170  </head> 
    171171 
    172172  <body> 
     173     <div id="north"> 
     174       <p style="font-size:16pt;color:#15428B;font-weight:bold">MapFish example: complex custom tree</p> 
     175    </div> 
    173176    <div class="description"> 
    174177      The tree below demonstrates the following features: 
    175178      <ul> 
  • MapFish/client/examples/tree/tree_reorder.html

     
    115115  </head> 
    116116 
    117117  <body> 
     118    <div id="north"> 
     119       <p style="font-size:16pt;color:#15428B;font-weight:bold">MapFish example: tree with reordering functions</p> 
     120    </div> 
    118121    <div id="right"> 
    119122      You can drag and drop the layers below: 
    120123      <div id="tree"></div> 
  • MapFish/client/examples/recenter/basic.html

     
    4545 
    4646    var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", 
    4747            "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}, {buffer: 0}); 
    48     map.addLayers([wms]); 
    4948 
    5049    var viewport = new Ext.Viewport({ 
    5150      layout:'border', 
     
    5352        new Ext.BoxComponent({ // raw 
    5453          region: 'north', 
    5554          el: 'north', 
    56           height: 32 
     55          height: 32, 
     56          margins: {left: 5,top: 5} 
    5757        }), 
    5858        { 
    5959          region: 'west', 
     
    8989            region: 'center', 
    9090            title: 'Map', 
    9191            layout: 'fit', 
    92             xtype: 'mapcomponent', 
    93             map: map 
     92            xtype: 'gx_mappanel', 
     93            map: map, 
     94            layers: [wms], 
     95            center: new OpenLayers.LonLat(8.5, 0), 
     96            zoom: 7 
    9497        }] 
    9598    }); 
    96  
    97     map.setCenter(new OpenLayers.LonLat(8.5, 0), 3); 
    9899  }); 
    99100</script> 
    100101</head> 
    101102<body> 
    102103  <div id="west"></div> 
    103104  <div id="north"> 
    104     <p style="font-size:14pt" align="center">MapFish recenter</p> 
     105    <p style="font-size:16pt;color:#15428B;font-weight:bold">MapFish example: recenter</p> 
    105106  </div> 
    106107  <div id="center"></div> 
    107108</body> 
  • MapFish/client/examples/shortcuts/layout.html

     
    1010    <script type="text/javascript" src="../../mfbase/ext/adapter/ext/ext-base.js"></script> 
    1111    <script type="text/javascript" src="../../mfbase/ext/ext-all-debug.js"></script> 
    1212 
     13    <script type="text/javascript" src="../../mfbase/geoext/lib/GeoExt.js"></script> 
     14 
    1315    <script type="text/javascript"> 
    1416      // Because of a bug in Firefox 2 we need to specify the MapFish base path. 
    1517      // See https://bugzilla.mozilla.org/show_bug.cgi?id=351282 
     
    3739        Ext.state.Manager.setProvider(new Ext.state.CookieProvider()); 
    3840         
    3941         
    40         var map = new OpenLayers.Map('olmap'); 
     42        var map = new OpenLayers.Map(); 
    4143 
    4244        var wms = new OpenLayers.Layer.WMS("OpenLayers WMS",  
    4345            "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}, {buffer: 0}); 
    4446 
    45         map.addLayers([wms]); 
    4647        map.addControl(new OpenLayers.Control.LayerSwitcher()); 
    47         map.setCenter(new OpenLayers.LonLat(17, 2), 2); 
    4848         
    4949        var store = new Ext.data.SimpleStore({ 
    5050            fields: ['value', 'text', 'bbox'], 
     
    5959        var shortcuts = new mapfish.widgets.Shortcuts({ 
    6060            map: map, 
    6161            store: store, 
     62            defaults: {anchor: '100%'},             
    6263            templates: { 
    6364                header: new Ext.Template("Choose a continent in the list"), 
    6465                footer: new Ext.Template("The map will automatically center to this location") 
     
    7172                new Ext.BoxComponent({ // raw 
    7273                    region:'north', 
    7374                    el: 'north', 
    74                     height:32 
     75                    height:32, 
     76                    margins: {left: 5,top: 5} 
    7577                }),{ 
    7678                    region:'south', 
    7779                    contentEl: 'south', 
     
    115117                    region:'center', 
    116118                    title: 'Map', 
    117119                    layout: 'fit', 
    118                     xtype: 'mapcomponent', 
    119                     map: map 
     120                    xtype: 'gx_mappanel', 
     121                    map: map, 
     122                    layers: [wms] 
    120123                } 
    121124             ] 
    122125        }); 
     
    128131    <p>Hi. I'm the west panel.</p> 
    129132  </div> 
    130133  <div id="north"> 
    131     <p>MapFish</p> 
     134    <p style="font-size:16pt;color:#15428B;font-weight:bold">MapFish example: complex shortcuts</p> 
    132135  </div> 
    133   <div id="olmap"> 
    134   </div> 
    135136  <div id="south"> 
    136     <p>south - generally for informational stuff, also could be for status bar</p> 
     137    <p></p> 
    137138  </div> 
    138139 
    139140 </body> 
  • MapFish/client/examples/earth/earth.html

     
    1111 
    1212    <script type="text/javascript" src="../../mfbase/ext/adapter/ext/ext-base.js"></script> 
    1313    <script type="text/javascript" src="../../mfbase/ext/ext-all-debug.js"></script> 
    14  
     14   
     15    <script type="text/javascript" src="../../mfbase/geoext/lib/GeoExt.js"></script> 
     16 
    1517    <script type="text/javascript"> 
    1618      // Because of a bug in Firefox 2 we need to specify the MapFish base path. 
    1719      // See https://bugzilla.mozilla.org/show_bug.cgi?id=351282 
     
    7476        options.controls = [ 
    7577            new OpenLayers.Control.Navigation()             
    7678        ] 
    77         map = new OpenLayers.Map('mapContainer', options); 
     79        map = new OpenLayers.Map(options); 
    7880 
    79         var mapcomponent = new mapfish.widgets.MapComponent({map: map}); 
    80  
    8181        // Creates OSM layer 
    8282        var mapnik = new OpenLayers.Layer.TMS( 
    8383            "OpenStreetMap", 
     
    100100            "Google Hybrid", 
    101101            {type: G_HYBRID_MAP, 'sphericalMercator': true} 
    102102        ); 
    103                 
    104         map.addLayers([mapnik, gmap, gsat, ghyb]); 
    105                                            
     103                                           
    106104        var toolbar = new mapfish.widgets.toolbar.Toolbar({ 
    107105            map: map, 
    108106            configurable: false 
     
    139137                            }] 
    140138                        },{ 
    141139                            region: 'center', 
    142                             contentEl: 'mapContainer', 
    143140                            minWidth: 200, 
    144                             title: 'MapFish 2D' 
     141                            title: 'MapFish 2D', 
     142                            xtype: "gx_mappanel", 
     143                            layers: [mapnik, gmap, gsat, ghyb], 
     144                            map: map, 
     145                            center:  new OpenLayers.LonLat(-13625995.09, 4550849.74), 
     146                            zoom: 14 
    145147                        },{ 
    146148                            region: 'east', 
    147149                            width: '40%', 
     
    160162                } 
    161163            ] 
    162164        }); 
    163                  
    164         var center = new OpenLayers.LonLat(-13625995.09, 4550849.74);         
    165         map.setCenter(center, 14);                
    166          
     165         
    167166        // Creates GE plugin 
    168167        earth = new mapfish.Earth(map, 'map3dContainer', {lonLat: center, 
    169168                                                          altitude: 50, 
     
    239238<body> 
    240239  <div id="header"><a href="http://www.mapfish.org/"><img src="mapfish.png" width="139" height="74" /></a><div id="title">MapFish and Google Earth Demonstration</div></div> 
    241240  <div id="menu"></div> 
    242   <div id="mapContainer"></div> 
    243241  <div id="map3dContainer"> 
    244242  </div> 
    245243  <div id="footer" class="x-border-layout-ct">License Information: MapFish and Ext JS licensed under <a href="http://www.gnu.org/licenses/gpl-3.0.html">GPLv3</a>, Google Earth API <a href="http://code.google.com/intl/fr/apis/maps/terms.html">Terms of Service</a></div> 
  • MapFish/client/examples/geostat/proportionalSymbols.html

     
    6767    </style> 
    6868  </head> 
    6969  <body> 
    70     <h1 class="page-title">Proportional symbols Example</h1> 
     70   <div id="north"> 
     71    <p style="font-size:16pt;color:#15428B;font-weight:bold">MapFish example: proportional symbols</p> 
     72  </div> 
    7173 
    7274    <div id="content"> 
    7375      <div id="right"> 
  • MapFish/client/examples/editing/list.html

     
    2222  </style> 
    2323</head> 
    2424<body> 
    25   <div id="title"> 
    26     <h1 style="font-size:20px">MapFish, FeatureList example</h1> 
     25  <div id="north"> 
     26    <p style="font-size:16pt;color:#15428B;font-weight:bold">MapFish example: feature list</p> 
    2727  </div> 
    28   <div id="olmap"> 
    29   </div> 
    3028  <div id="help"> 
    3129    <!-- if somebody can tell me why the squares are not shown, I'll be happy! --> 
    3230    <ul class="list"> 
     
    4745<script type="text/javascript" src="../../mfbase/ext/adapter/ext/ext-base.js"></script> 
    4846<script type="text/javascript" src="../../mfbase/ext/ext-all-debug.js"></script> 
    4947 
     48<script type="text/javascript" src="../../mfbase/geoext/lib/GeoExt.js"></script> 
     49 
    5050<script type="text/javascript"> 
    5151  // Because of a bug in Firefox 2 we need to specify the MapFish base path. 
    5252  // See https://bugzilla.mozilla.org/show_bug.cgi?id=351282 
     
    111111    /* 
    112112     * Define OpenLayers map. 
    113113     */ 
    114     var map = new OpenLayers.Map('olmap'); 
     114    var map = new OpenLayers.Map(); 
    115115 
    116116    var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", 
    117117        "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}, {buffer: 0}); 
    118118 
    119     map.addLayers([wms]); 
    120119    map.addControl(new OpenLayers.Control.LayerSwitcher()); 
    121     map.setCenter(new OpenLayers.LonLat(17, 2), 2); 
    122120 
    123121    /* 
    124122     * Define record type. 
     
    301299                frame: true, 
    302300                border: true, 
    303301                region: 'north', 
    304                 contentEl: 'title' 
     302                contentEl: 'north' 
    305303            }, { 
    306304                region: 'east', 
    307305                title: 'Feature editing', 
     
    345343            }, { 
    346344                region:'center', 
    347345                title: 'Map', 
    348                 xtype: 'mapcomponent', 
     346                xtype: 'gx_mappanel', 
     347                layers: [wms], 
    349348                map: map 
    350349        }] 
    351350    }); 
  • MapFish/client/examples/editing/editing-panel.html

     
    1111    <script type="text/javascript" src="../../mfbase/ext/adapter/ext/ext-base.js"></script> 
    1212    <script type="text/javascript" src="../../mfbase/ext/ext-all-debug.js"></script> 
    1313 
     14    <script type="text/javascript" src="../../mfbase/geoext/lib/GeoExt.js"></script> 
     15 
    1416    <script type="text/javascript"> 
    1517      // Because of a bug in Firefox 2 we need to specify the MapFish base path. 
    1618      // See https://bugzilla.mozilla.org/show_bug.cgi?id=351282 
     
    4143    // reference local blank image 
    4244    Ext.BLANK_IMAGE_URL = '../../mfbase/ext/resources/images/default/s.gif'; 
    4345   
    44     var map; 
    45    
    4646    Ext.onReady(function() { 
    4747        Ext.QuickTips.init(); 
    4848         
    49         map = new OpenLayers.Map('olmap'); 
     49        var map = new OpenLayers.Map(); 
    5050 
    51         var setupMap = function(viewport) { 
    52             var map = viewport.findById('map').map; 
    53             var wms = new OpenLayers.Layer.WMS("OpenLayers WMS",  
    54                 "http://labs.metacarta.com/wms/vmap0", 
    55                 {layers: 'basic'}, 
    56                 {buffer: 0} 
    57             ); 
    58             map.addLayers([wms]); 
    59             map.addControl(new OpenLayers.Control.LayerSwitcher()); 
    60             map.setCenter(new OpenLayers.LonLat(17, 2), 3); 
    61         }; 
     51        var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", 
     52            "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}, {buffer: 0}); 
     53 
     54        map.addControl(new OpenLayers.Control.LayerSwitcher()); 
    6255         
    63         var layerConfig = { 
     56       var layerConfig = { 
    6457            polygons: { 
    6558                text: 'Polygons', 
    6659                protocol: new mapfish.Protocol.MapFish({ 
     
    118111 
    119112        new Ext.Viewport({ 
    120113            layout: 'border', 
    121             listeners: {'afterlayout': {'fn': setupMap}}, 
    122114            items: [ 
    123115                new Ext.BoxComponent({ 
    124116                    region: 'north', 
    125117                    el: 'north', 
    126                     height: 32 
     118                    height: 32, 
     119                    margins: {left: 5,top: 5} 
    127120                }), { 
    128121                    region: 'east', 
    129122                    id: 'east-panel', 
     
    143136                    }] 
    144137                }, { 
    145138                    region: 'center', 
    146                     id: 'map', 
    147139                    title: 'Map', 
    148140                    map: map, 
    149                     xtype: 'mapcomponent' 
     141                    xtype: 'gx_mappanel', 
     142                    layers: [wms] 
    150143                } 
    151144            ] 
    152145        }); 
     
    154147        </script> 
    155148</head> 
    156149<body> 
    157   <div id="north"></div> 
    158     <p>Feature editing panel example</p> 
     150  <div id="north"> 
     151    <p style="font-size:16pt;color:#15428B;font-weight:bold">MapFish example: feature editing panel</p> 
    159152  </div> 
    160   <div id="olmap"></div> 
    161153  <div id="helptext"> 
    162154    <ul class="list"> 
    163155      <li class="list">Choose a layer in the list of layers to edit</li>