source:
trunk/workshop-routing-foss4g/web/GeoExt/docs/_static/front-page.js
@
79
Revision 76, 1.0 KB checked in by djay, 13 years ago (diff) | |
---|---|
|
Line | |
---|---|
1 | Ext.onReady(function() { |
2 | var win, block = Ext.Element.get(Ext.DomQuery.select("div.execute")[0]); |
3 | var button = new Ext.Button({ |
4 | text: "Run it!", |
5 | cls: "execute", |
6 | handler: function() { |
7 | if(!win) { |
8 | win = new Ext.Window({ |
9 | title: "GeoExt in Action", |
10 | height: 280, width: 450, |
11 | layout: "fit", |
12 | closeAction: "hide", |
13 | items: [{ |
14 | xtype: "gx_mappanel", |
15 | layers: [new OpenLayers.Layer.WMS( |
16 | "Global Imagery", "http://maps.opengeo.org/geowebcache/service/wms", |
17 | {layers: "bluemarble"} |
18 | )], |
19 | zoom: 1 |
20 | }] |
21 | }); |
22 | } |
23 | win.show(container); |
24 | } |
25 | }); |
26 | var container = Ext.Element.get(Ext.DomHelper.append(block, {tag: "div"})); |
27 | container.setHeight(35, {callback: function() {button.render(container)}}); |
28 | }); |
Note: See TracBrowser
for help on using the repository browser.