diff options
author | heather <unknown> | 2011-05-06 07:08:56 -0400 |
---|---|---|
committer | heather <unknown> | 2011-05-06 07:08:56 -0400 |
commit | cf5096f5b247e3689c58cab230ef53e00f66c184 (patch) | |
tree | 330b3114d121de9e680e26196c76175c56b97ab8 | |
parent | 10d11e2e1e77c6d45f5114c743a210c114e3f49d (diff) | |
download | d2-cf5096f5b247e3689c58cab230ef53e00f66c184.tar.bz2 d2-cf5096f5b247e3689c58cab230ef53e00f66c184.tar.xz d2-cf5096f5b247e3689c58cab230ef53e00f66c184.zip |
map centering seems to be working
-rw-r--r-- | templates/index.html | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/templates/index.html b/templates/index.html index 5977438..86d1bac 100644 --- a/templates/index.html +++ b/templates/index.html | |||
@@ -30,8 +30,8 @@ | |||
30 | function init() | 30 | function init() |
31 | { | 31 | { |
32 | var ext = new OpenLayers.Bounds(0, 0, map_width, map_height); | 32 | var ext = new OpenLayers.Bounds(0, 0, map_width, map_height); |
33 | //var size = new OpenLayers.Size(map_width, map_height); | 33 | var size = new OpenLayers.Size(map_width, map_height); |
34 | var size = new OpenLayers.Size(map_width/4, map_height/4); | 34 | //var size = new OpenLayers.Size(map_width/4, map_height/4); |
35 | 35 | ||
36 | options = {numZoomLevels: 6, | 36 | options = {numZoomLevels: 6, |
37 | units: 'pixels', | 37 | units: 'pixels', |
@@ -66,11 +66,9 @@ | |||
66 | {isBaseLayer: false} | 66 | {isBaseLayer: false} |
67 | ); | 67 | ); |
68 | 68 | ||
69 | /* | ||
70 | name_label.events.register("loadend", name_label, function() { | 69 | name_label.events.register("loadend", name_label, function() { |
71 | emphasize(); | 70 | emphasize(); |
72 | }); | 71 | }); |
73 | */ | ||
74 | 72 | ||
75 | map.addLayers([outline, ntwk_id, name_label]); | 73 | map.addLayers([outline, ntwk_id, name_label]); |
76 | map.zoomToExtent(ext); | 74 | map.zoomToExtent(ext); |
@@ -93,10 +91,16 @@ | |||
93 | //Note: origin is set at the bottom left corner for OpenLayers !!! | 91 | //Note: origin is set at the bottom left corner for OpenLayers !!! |
94 | function setCenter() | 92 | function setCenter() |
95 | { | 93 | { |
94 | map.setCenter(new OpenLayers.LonLat(center_point_x, | ||
95 | center_point_y), | ||
96 | 0, true, true); | ||
97 | |||
96 | //map.setCenter(new OpenLayers.LonLat(280, 683), 0, true, true) ; | 98 | //map.setCenter(new OpenLayers.LonLat(280, 683), 0, true, true) ; |
99 | /* | ||
97 | map.setCenter(new OpenLayers.LonLat(center_point_x, | 100 | map.setCenter(new OpenLayers.LonLat(center_point_x, |
98 | center_point_y), | 101 | center_point_y), |
99 | 2, true, true); | 102 | 2, true, true); |
103 | */ | ||
100 | } | 104 | } |
101 | </script> | 105 | </script> |
102 | {% end %} | 106 | {% end %} |