Subversion Repositories eFlore/Applications.cel

Rev

Rev 3845 | Rev 3848 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3845 Rev 3847
Line 278... Line 278...
278
 
278
 
279
    this.handleNewLocation(coordinates);
279
    this.handleNewLocation(coordinates);
Line 280... Line 280...
280
};
280
};
-
 
281
 
-
 
282
Geoloc.prototype.handleMarkerEvents = function() {
281
 
283
    if(this.map) {
282
Geoloc.prototype.handleMarkerEvents = function() {
284
        const lthis = this;
-
 
285
        // move marker on click
-
 
286
        $(this.map).off('click').on('click', function(evt) {
283
    // move marker on click
287
            lthis.handleNewLocation(evt.latlng);
-
 
288
        });
284
    $(this.map).off('click').on('click', evt => this.handleNewLocation(evt.latlng).bind(this));
289
        // move marker on drag
-
 
290
        $(this.map.marker).off('dragend').on('dragend', function() {
-
 
291
            lthis.handleNewLocation(lthis.map.marker.getLatLng());
285
    // move marker on drag
292
        });
Line 286... Line 293...
286
    $(this.map.marker).off('dragend').on('dragend', () => this.handleNewLocation(this.map.marker.getLatLng()).bind(this));
293
    }
287
};
294
};
288
 
295