@@ -95,7 +95,7 @@ L.VectorGrid = L.GridLayer.extend({
9595 }
9696
9797 if ( styleOptions instanceof Function ) {
98- styleOptions = styleOptions ( feat . properties , coords . z , feat . type ) ;
98+ styleOptions = styleOptions ( feat . properties , coords . z ) ;
9999 }
100100
101101 if ( ! ( styleOptions instanceof Array ) ) {
@@ -109,12 +109,7 @@ L.VectorGrid = L.GridLayer.extend({
109109 var featureLayer = this . _createLayer ( feat , pxPerExtent ) ;
110110
111111 for ( var j = 0 ; j < styleOptions . length ; j ++ ) {
112- if ( styleOptions [ j ] instanceof Function ) {
113- var styleOption = styleOptions [ j ] ( feat . properties , coords . z , feat . type ) ;
114- } else {
115- var styleOption = styleOptions [ j ] ;
116- }
117- var style = L . extend ( { } , L . Path . prototype . options , styleOption ) ;
112+ var style = L . extend ( { } , L . Path . prototype . options , styleOptions [ j ] ) ;
118113 featureLayer . render ( renderer , style ) ;
119114 renderer . _addPath ( featureLayer ) ;
120115 }
@@ -193,18 +188,15 @@ L.VectorGrid = L.GridLayer.extend({
193188
194189 _updateStyles : function ( feat , renderer , styleOptions ) {
195190 styleOptions = ( styleOptions instanceof Function ) ?
196- styleOptions ( feat . properties , renderer . getCoord ( ) . z , feat . type ) :
191+ styleOptions ( feat . properties , renderer . getCoord ( ) . z ) :
197192 styleOptions ;
198193
199194 if ( ! ( styleOptions instanceof Array ) ) {
200195 styleOptions = [ styleOptions ] ;
201196 }
202197
203198 for ( var j = 0 ; j < styleOptions . length ; j ++ ) {
204- var styleOption = ( styleOptions [ j ] instanceof Function ) ?
205- styleOptions [ j ] ( feat . properties , renderer . getCoord ( ) . z , feat . type ) :
206- styleOptions [ j ] ;
207- var style = L . extend ( { } , L . Path . prototype . options , styleOption ) ;
199+ var style = L . extend ( { } , L . Path . prototype . options , styleOptions [ j ] ) ;
208200 feat . updateStyle ( renderer , style ) ;
209201 }
210202 } ,
0 commit comments