@@ -1929,13 +1929,15 @@ L.TileLayer = L.Class.extend({
1929
1929
if ( this . _container ) {
1930
1930
this . _map . _panes . tilePane . appendChild ( this . _container ) ;
1931
1931
}
1932
+ return this ;
1932
1933
} ,
1933
1934
1934
1935
bringToBack : function ( ) {
1935
1936
var pane = this . _map . _panes . tilePane ;
1936
1937
if ( this . _container ) {
1937
1938
pane . insertBefore ( this . _container , pane . firstChild ) ;
1938
1939
}
1940
+ return this ;
1939
1941
} ,
1940
1942
1941
1943
getAttribution : function ( ) {
@@ -1948,6 +1950,8 @@ L.TileLayer = L.Class.extend({
1948
1950
if ( this . _map ) {
1949
1951
this . _updateOpacity ( ) ;
1950
1952
}
1953
+
1954
+ return this ;
1951
1955
} ,
1952
1956
1953
1957
setUrl : function ( url , noRedraw ) {
@@ -2244,7 +2248,7 @@ L.TileLayer = L.Class.extend({
2244
2248
//Only if we are loading an actual image
2245
2249
if ( this . src !== L . Util . emptyImageUrl ) {
2246
2250
L . DomUtil . addClass ( this , 'leaflet-tile-loaded' ) ;
2247
-
2251
+
2248
2252
layer . fire ( 'tileload' , {
2249
2253
tile : this ,
2250
2254
url : this . src
@@ -2469,6 +2473,7 @@ L.ImageOverlay = L.Class.extend({
2469
2473
setOpacity : function ( opacity ) {
2470
2474
this . options . opacity = opacity ;
2471
2475
this . _updateOpacity ( ) ;
2476
+ return this ;
2472
2477
} ,
2473
2478
2474
2479
_initImage : function ( ) {
@@ -3438,6 +3443,7 @@ L.Path = L.Class.extend({
3438
3443
options : {
3439
3444
stroke : true ,
3440
3445
color : '#0033ff' ,
3446
+ dashArray : null ,
3441
3447
weight : 5 ,
3442
3448
opacity : 0.5 ,
3443
3449
@@ -3579,6 +3585,11 @@ L.Path = L.Path.extend({
3579
3585
this . _path . setAttribute ( 'stroke' , this . options . color ) ;
3580
3586
this . _path . setAttribute ( 'stroke-opacity' , this . options . opacity ) ;
3581
3587
this . _path . setAttribute ( 'stroke-width' , this . options . weight ) ;
3588
+ if ( this . options . dashArray ) {
3589
+ this . _path . setAttribute ( 'stroke-dasharray' , this . options . dashArray ) ;
3590
+ } else {
3591
+ this . _path . removeAttribute ( 'stroke-dasharray' ) ;
3592
+ }
3582
3593
} else {
3583
3594
this . _path . setAttribute ( 'stroke' , 'none' ) ;
3584
3595
}
@@ -3835,6 +3846,11 @@ L.Path = L.Browser.svg || !L.Browser.vml ? L.Path : L.Path.extend({
3835
3846
stroke . weight = options . weight + 'px' ;
3836
3847
stroke . color = options . color ;
3837
3848
stroke . opacity = options . opacity ;
3849
+ if ( options . dashArray ) {
3850
+ stroke . dashStyle = options . dashArray ;
3851
+ } else {
3852
+ stroke . dashStyle = '' ;
3853
+ }
3838
3854
} else if ( stroke ) {
3839
3855
container . removeChild ( stroke ) ;
3840
3856
this . _stroke = null ;
@@ -6145,6 +6161,8 @@ L.Control = L.Class.extend({
6145
6161
if ( map ) {
6146
6162
map . addControl ( this ) ;
6147
6163
}
6164
+
6165
+ return this ;
6148
6166
} ,
6149
6167
6150
6168
addTo : function ( map ) {
@@ -6184,6 +6202,7 @@ L.control = function (options) {
6184
6202
return new L . Control ( options ) ;
6185
6203
} ;
6186
6204
6205
+
6187
6206
L . Map . include ( {
6188
6207
addControl : function ( control ) {
6189
6208
control . addTo ( this ) ;
@@ -6295,6 +6314,7 @@ L.Control.Attribution = L.Control.extend({
6295
6314
setPrefix : function ( prefix ) {
6296
6315
this . options . prefix = prefix ;
6297
6316
this . _update ( ) ;
6317
+ return this ;
6298
6318
} ,
6299
6319
6300
6320
addAttribution : function ( text ) {
@@ -6306,13 +6326,17 @@ L.Control.Attribution = L.Control.extend({
6306
6326
this . _attributions [ text ] ++ ;
6307
6327
6308
6328
this . _update ( ) ;
6329
+
6330
+ return this ;
6309
6331
} ,
6310
6332
6311
6333
removeAttribution : function ( text ) {
6312
6334
if ( ! text ) { return ; }
6313
6335
6314
6336
this . _attributions [ text ] -- ;
6315
6337
this . _update ( ) ;
6338
+
6339
+ return this ;
6316
6340
} ,
6317
6341
6318
6342
_update : function ( ) {
@@ -6365,6 +6389,7 @@ L.control.attribution = function (options) {
6365
6389
return new L . Control . Attribution ( options ) ;
6366
6390
} ;
6367
6391
6392
+
6368
6393
L . Control . Scale = L . Control . extend ( {
6369
6394
options : {
6370
6395
position : 'bottomleft' ,
0 commit comments