]> dev.renevier.net Git - syj.git/blobdiff - public/js/syjraw.js
js strict mode in development files
[syj.git] / public / js / syjraw.js
index cf6be9c37eb8e964d3ea010be1581735d046a28c..46a44c255e12e5a60a0b51a456259eda11d09705 100644 (file)
@@ -1,3 +1,5 @@
+"use strict";
+
 var WGS84 = new OpenLayers.Projection("EPSG:4326");
 var Mercator = new OpenLayers.Projection("EPSG:900913");
 
@@ -19,7 +21,10 @@ function resizeMap() {
 
 function init() {
     var map = new OpenLayers.Map('map', {
-                controls: [ new OpenLayers.Control.Attribution() ],
+                controls: [
+                    new OpenLayers.Control.Navigation(),
+                    new OpenLayers.Control.Attribution()
+                ],
                 theme: null}),
 
          baseLayer = new OpenLayers.Layer.OSM("OSM", null, { attribution: SyjStrings.osmAttribution }),
@@ -34,7 +39,7 @@ function init() {
 
     map.addLayers([baseLayer, viewLayer]);
     viewLayer.addFeatures([wkt.read(gInitialGeom.data)]);
-    extent = viewLayer.getDataExtent();
+    var extent = viewLayer.getDataExtent();
     map.updateSize();
     map.zoomToExtent(extent);
     resizeMap();