+ var locate = function () {
+ if (self.options.setView) {
+ self._locateOnNextLocationFound = true;
+ }
+ if(!self._active) {
+ map.locate(self._locateOptions);
+ }
+ self._active = true;
+ if (self.options.follow) {
+ startFollowing();
+ }
+ if (!self._event) {
+ L.DomUtil.addClass(self._container, "requesting");
+ L.DomUtil.removeClass(self._container, "active");
+ L.DomUtil.removeClass(self._container, "following");
+ } else {
+ visualizeLocation();
+ }
+ };
+