crosshair cursor instead of marker

This commit is contained in:
Norbert Renner 2014-05-14 13:14:35 +02:00
parent a732dfdd98
commit 53587c865b
2 changed files with 13 additions and 4 deletions

View file

@ -88,8 +88,8 @@ td {
width: 92.5px; width: 92.5px;
} }
.leaflet-container { .routing-draw-enabled {
cursor: auto; cursor: crosshair;
} }
/* left sidebar as additional control position */ /* left sidebar as additional control position */

View file

@ -1,17 +1,26 @@
BR.Routing = L.Routing.extend({ BR.Routing = L.Routing.extend({
options: { options: {
/* not implemented yet
icons: { icons: {
/* not implemented yet
start: new L.Icon.Default({iconUrl: 'bower_components/leaflet-gpx/pin-icon-start.png'}), start: new L.Icon.Default({iconUrl: 'bower_components/leaflet-gpx/pin-icon-start.png'}),
end: new L.Icon.Default(), end: new L.Icon.Default(),
normal: new L.Icon.Default() normal: new L.Icon.Default()
},*/ */
draw: false
},
snapping: null snapping: null
}, },
onAdd: function (map) { onAdd: function (map) {
var container = L.Routing.prototype.onAdd.call(this, map); var container = L.Routing.prototype.onAdd.call(this, map);
this._draw.on('enabled', function() {
L.DomUtil.addClass(map.getContainer(), 'routing-draw-enabled');
});
this._draw.on('disabled', function() {
L.DomUtil.removeClass(map.getContainer(), 'routing-draw-enabled');
});
// enable drawing mode // enable drawing mode
this.draw(true); this.draw(true);