-/* This file is part of Syj, Copyright (c) 2010 Arnaud Renevier,
+/* This file is part of Syj, Copyright (c) 2010-2011 Arnaud Renevier,
and is published under the AGPL license. */
// avoid openlayers alerts
} else {
this.map.setCenter(center, zoom);
}
+ this.resizeMap();
+ },
+
+ resizeMap: function() {
+ var map = $('map');
+ map.style.width = map.offsetWidth.toString() + 'px';
+ map.style.height = map.offsetHeight.toString() + 'px';
},
observer: function(evt) {
case 400:
case 404:
message = SyjStrings.requestError;
- if (transport.responseJSON) {
- switch (transport.responseJSON.message) {
- case "uniquepath":
- message = SyjStrings.uniquePathError;
- break;
- default:
- break;
- }
- }
break;
case 403:
message = "";
return undefined;
}
};
+
+window.onresize = function() {
+ SYJView.resizeMap();
+};