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:
@@ -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'}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user