Avoid touching the geolocation object until needed

IE9 leaks when `navigator.geolocation` is accessed (see #461).  The goal of this change is to avoid that leak in builds that include the Geolocate control but do not use it.
This commit is contained in:
Tim Schaub
2013-02-04 15:46:45 -07:00
parent 47e7c300a8
commit 84e36dd573
2 changed files with 12 additions and 13 deletions

View File

@@ -101,18 +101,6 @@
map.removeControl(control);
map.setCenter(centerLL);
}
function test_uncapable(t) {
t.plan(1);
var control = new OpenLayers.Control.Geolocate({
geolocation: null,
bind: false
});
control.events.register('locationuncapable', null, function() {
t.ok(true,'uncapable browser fired locationuncapable event');
});
map.addControl(control);
control.activate();
}
function test_destroy(t) {
t.plan(1);
var control = new OpenLayers.Control.Geolocate({