Use document.getElementById in examples.

Previously examples would either use the now deprecated `window.$` or the
non-API-method `OpenLayers.Util.getElement`. This was well caught by @probins
and @elemoine.
This commit is contained in:
Marc Jansen
2012-05-29 21:47:22 +02:00
parent 042ad8d711
commit acb9f950df
11 changed files with 51 additions and 69 deletions

View File

@@ -33,10 +33,9 @@
vlayer.drawFeature(feature);
}
function init() {
var $ = OpenLayers.Util.getElement;
map = new OpenLayers.Map( 'map',
{
'maxExtent': new OpenLayers.Bounds(0, 0, $("map").clientWidth, $("map").clientHeight),
'maxExtent': new OpenLayers.Bounds(0, 0, document.getElementById("map").clientWidth, document.getElementById("map").clientHeight),
controls: [],
maxResolution: 'auto'}
);