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

@@ -67,8 +67,6 @@ OpenLayers.Strategy.RuleCluster = OpenLayers.Class(OpenLayers.Strategy.Cluster,
// global variables
var map, vectorlayer, features, stylemap, select;
var $ = OpenLayers.Util.getElement;
// wrap the instanciation code in an anonymous function that gets executed
// immeadeately
(function(){
@@ -97,14 +95,14 @@ var $ = OpenLayers.Util.getElement;
} else {
info += '  Single feature of clazz = ' + feature.attributes.clazz;
}
$('info').innerHTML = info;
document.getElementById('info').innerHTML = info;
};
// The function that gets called on feature selection. Shows information
// about the number of "points" on the map.
var updateGeneralInformation = function() {
var info = 'Currently ' + vectorlayer.features.length + ' points are shown on the map.';
$('generalinfo').innerHTML = info;
document.getElementById('generalinfo').innerHTML = info;
};
// instanciate the map