}
self._active = true;
if (!self._event) {
- self._container.className = className + " requesting";
+ L.DomUtil.addClass(self._container, "requesting");
} else {
visualizeLocation();
}
if (!self._container)
return;
- self._container.className = className + " active";
+
+ L.DomUtil.removeClass(self._container, "requesting");
+ L.DomUtil.addClass(self._container, "active");
};
var resetVariables = function() {
_log('stopLocate');
map.stopLocate();
- self._container.className = className;
+ L.DomUtil.removeClass(self._container, "requesting");
+ L.DomUtil.removeClass(self._container, "active");
+
resetVariables();
self._layer.clearLayers();