Mercurial > dive4elements > gnv-client
comparison gnv/src/main/webapp/scripts/viewport.jsp @ 1018:4eb7fa8a36ed
Changed OpenLayers MouseDefault control with an OpenLayers Navigation control. Before panning the map, the user needs to activate this control (issue311).
gnv/trunk@1248 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 30 Jun 2010 06:30:02 +0000 |
parents | cce6596560e6 |
children |
comparison
equal
deleted
inserted
replaced
1017:cce6596560e6 | 1018:4eb7fa8a36ed |
---|---|
55 | 55 |
56 panel = new OpenLayers.Control.Panel(); | 56 panel = new OpenLayers.Control.Panel(); |
57 controls = { | 57 controls = { |
58 previous: nav.previous, | 58 previous: nav.previous, |
59 next : nav.next, | 59 next : nav.next, |
60 navigate: new OpenLayers.Control.MouseDefaults( | 60 navigate: new OpenLayers.Control.Navigation( |
61 { | 61 { |
62 displayClass: 'olControlPan', | 62 displayClass: 'olControlPan', |
63 autoActivate: 'false', | |
63 title:'<bean:message key="gnviewer.mapclient.controls.navigate.title"/>' | 64 title:'<bean:message key="gnviewer.mapclient.controls.navigate.title"/>' |
64 } | 65 } |
65 ), | 66 ), |
66 zoombox: new OpenLayers.Control.ZoomBox( | 67 zoombox: new OpenLayers.Control.ZoomBox( |
67 { | 68 { |
85 panel.addControls([controls[key]]); | 86 panel.addControls([controls[key]]); |
86 } | 87 } |
87 | 88 |
88 map.addControl(panel); | 89 map.addControl(panel); |
89 map.addControl(new OpenLayers.Control.PanZoomBar({zoomWorldIcon: 'true'})); | 90 map.addControl(new OpenLayers.Control.PanZoomBar({zoomWorldIcon: 'true'})); |
90 map.addControl(new OpenLayers.Control.MouseDefaults()); | |
91 // Displaying the mouse postion | 91 // Displaying the mouse postion |
92 mousePosition = new OpenLayers.Control.MousePosition(); | 92 mousePosition = new OpenLayers.Control.MousePosition(); |
93 map.addControl(mousePosition); | 93 map.addControl(mousePosition); |
94 | 94 |
95 /* --------------------------------------------------------------------------- */ | 95 /* --------------------------------------------------------------------------- */ |