-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.js
51 lines (43 loc) · 1.17 KB
/
example.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Ext.onReady(function() {
Ext.QuickTips.init();
var map = new OpenLayers.Map()
var osm = new OpenLayers.Layer.OSM()
map.addLayers([osm])
var ctrl, toolbarItems = [], action, actions = {};
// Navigation history - two "button" controls
ctrl = new OpenLayers.Control.NavigationHistory();
map.addControl(ctrl);
action = new GeoExt.Action({
text: "previous",
control: ctrl.previous,
disabled: true,
tooltip: "previous in history"
});
actions["previous"] = action;
toolbarItems.push(action);
action = new GeoExt.Action({
text: "next",
control: ctrl.next,
disabled: true,
tooltip: "next in history"
});
actions["next"] = action;
toolbarItems.push(action);
toolbarItems.push("->");
var win = new GeoExt.OverviewMap({
title: 'Overview Map',
closable:true,
width:200,
height:200,
map: map
})
var mapPanel = new GeoExt.MapPanel({
renderTo: "mappanel",
height: 400,
width: 600,
map: map,
center: new OpenLayers.LonLat(5, 45),
zoom: 4,
tbar: toolbarItems
})
})