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

@@ -92,16 +92,15 @@ geolocate.events.register("locationupdated",geolocate,function(e) {
geolocate.events.register("locationfailed",this,function() {
OpenLayers.Console.log('Location detection failed');
});
var $ = OpenLayers.Util.getElement;
$('locate').onclick = function() {
document.getElementById('locate').onclick = function() {
vector.removeAllFeatures();
geolocate.deactivate();
$('track').checked = false;
document.getElementById('track').checked = false;
geolocate.watch = false;
firstGeolocation = true;
geolocate.activate();
};
$('track').onclick = function() {
document.getElementById('track').onclick = function() {
vector.removeAllFeatures();
geolocate.deactivate();
if (this.checked) {
@@ -110,4 +109,4 @@ $('track').onclick = function() {
geolocate.activate();
}
};
$('track').checked = false;
document.getElementById('track').checked = false;