|
Revision 1975, 1.2 kB
(checked in by adube, 6 months ago)
|
wmslayeradder - textfield url fix, selectRow(0)
|
- Property svn:mime-type set to
text/plain
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
var WMSLayerAdder, mapPanel; |
|---|
| 2 |
|
|---|
| 3 |
//OpenLayers.ProxyHost = "./proxy.py?url="; |
|---|
| 4 |
|
|---|
| 5 |
Ext.onReady(function() { |
|---|
| 6 |
|
|---|
| 7 |
Ext.QuickTips.init(); |
|---|
| 8 |
|
|---|
| 9 |
mapPanel = new GeoExt.MapPanel({ |
|---|
| 10 |
region: "center", |
|---|
| 11 |
layers: [new OpenLayers.Layer.WMS("Global Imagery", |
|---|
| 12 |
"http://labs.metacarta.com/wms/vmap0", |
|---|
| 13 |
{layers: "basic"})] , |
|---|
| 14 |
center: [-68,52], |
|---|
| 15 |
zoom: 4 |
|---|
| 16 |
}); |
|---|
| 17 |
|
|---|
| 18 |
var oServerStore = new Ext.data.SimpleStore({ |
|---|
| 19 |
fields: ['url'], |
|---|
| 20 |
data : [ |
|---|
| 21 |
["http://127.0.0.1/cgi-bin/mapserv?map=/home/adube/proj/bdga/msp/wms/bdga.map"], |
|---|
| 22 |
['http://dev4g.mapgears.com/cgi-bin/mapserv?map=/home/mapgears/proj/geoprisma-demo/map/gmap/gmap75_wms.map'] |
|---|
| 23 |
] |
|---|
| 24 |
}); |
|---|
| 25 |
|
|---|
| 26 |
WMSLayerAdder = new GeoExt.ux.WMSLayerAdder({ |
|---|
| 27 |
title: OpenLayers.i18n("WMSLayerAdder"), |
|---|
| 28 |
region: "east", |
|---|
| 29 |
width: 500, |
|---|
| 30 |
gridPanelOptions: {'height': 210}, |
|---|
| 31 |
// comment the below line to have a 'textfield' instead of a 'combobox' |
|---|
| 32 |
serverStore: oServerStore, |
|---|
| 33 |
mapPanel: mapPanel |
|---|
| 34 |
}); |
|---|
| 35 |
|
|---|
| 36 |
new Ext.Panel({ |
|---|
| 37 |
renderTo: "content", |
|---|
| 38 |
layout: "border", |
|---|
| 39 |
width: 900, |
|---|
| 40 |
height: 350, |
|---|
| 41 |
items: [mapPanel, WMSLayerAdder] |
|---|
| 42 |
}); |
|---|
| 43 |
}); |
|---|