@@ -63,10 +63,10 @@ describe('openlayers_VectorTileStyles', function () {
6363 setTimeout ( function ( ) {
6464 expect ( style ) . not . toBeNull ( ) ;
6565 expect ( style . length ) . toEqual ( 1 ) ;
66- expect ( style [ 0 ] . stroke_ . color_ ) . toBe ( "rgba(232, 212, 85, 1)" ) ;
67- expect ( style [ 0 ] . stroke_ . width_ ) . toEqual ( 1.5118110236220474 ) ;
68- expect ( style [ 0 ] . stroke_ . lineJoin_ ) . toBe ( "round" ) ;
69- expect ( style [ 0 ] . stroke_ . miterLimit_ ) . toEqual ( 10 ) ;
66+ expect ( style [ 0 ] . getStroke ( ) . getColor ( ) ) . toBe ( "rgba(232, 212, 85, 1)" ) ;
67+ expect ( style [ 0 ] . getStroke ( ) . getWidth ( ) ) . toEqual ( 1.5118110236220474 ) ;
68+ expect ( style [ 0 ] . getStroke ( ) . getLineJoin ( ) ) . toBe ( "round" ) ;
69+ expect ( style [ 0 ] . getStroke ( ) . getMiterLimit ( ) ) . toEqual ( 10 ) ;
7070 vectorTileStyles = null ;
7171 done ( ) ;
7272 } , 1000 ) ;
@@ -161,10 +161,10 @@ describe('openlayers_VectorTileStyles', function () {
161161 setTimeout ( function ( ) {
162162 expect ( style ) . not . toBeNull ( ) ;
163163 expect ( style . length ) . toEqual ( 1 ) ;
164- expect ( style [ 0 ] . stroke_ . color_ ) . toBe ( "rgba(232, 212, 85, 1)" ) ;
165- expect ( style [ 0 ] . stroke_ . width_ ) . toEqual ( 1.5118110236220474 ) ;
166- expect ( style [ 0 ] . stroke_ . lineJoin_ ) . toBe ( "round" ) ;
167- expect ( style [ 0 ] . stroke_ . miterLimit_ ) . toEqual ( 10 ) ;
164+ expect ( style [ 0 ] . getStroke ( ) . getColor ( ) ) . toBe ( "rgba(232, 212, 85, 1)" ) ;
165+ expect ( style [ 0 ] . getStroke ( ) . getWidth ( ) ) . toEqual ( 1.5118110236220474 ) ;
166+ expect ( style [ 0 ] . getStroke ( ) . getLineJoin ( ) ) . toBe ( "round" ) ;
167+ expect ( style [ 0 ] . getStroke ( ) . getMiterLimit ( ) ) . toEqual ( 10 ) ;
168168 vectorTileStyles = null ;
169169 done ( ) ;
170170 } , 1000 ) ;
@@ -222,10 +222,10 @@ describe('openlayers_VectorTileStyles', function () {
222222 var styleLine = vectorTileStyles . getFeatureStyle ( featureLine ) ;
223223 setTimeout ( function ( ) {
224224 expect ( styleLine ) . not . toBeNull ( ) ;
225- expect ( styleLine . stroke_ . color_ ) . toBe ( "rgba(232,212,85,1)" ) ;
226- expect ( styleLine . stroke_ . width_ ) . toEqual ( 3.77952 ) ;
227- expect ( styleLine . stroke_ . lineJoin_ ) . toBe ( "round" ) ;
228- expect ( styleLine . stroke_ . miterLimit_ ) . toEqual ( 10 ) ;
225+ expect ( styleLine . getStroke ( ) . getColor ( ) ) . toBe ( "rgba(232,212,85,1)" ) ;
226+ expect ( styleLine . getStroke ( ) . getWidth ( ) ) . toEqual ( 3.77952 ) ;
227+ expect ( styleLine . getStroke ( ) . getLineJoin ( ) ) . toBe ( "round" ) ;
228+ expect ( styleLine . getStroke ( ) . getMiterLimit ( ) ) . toEqual ( 10 ) ;
229229 } , 1000 ) ;
230230 // featureRegionJSON通过JSON.stringify((new ol.format.GeoJSON()).writeFeatureObject(feature)获得,其中feature为视野范围内背景面对象
231231 var featureRegionJSON = {
@@ -246,11 +246,11 @@ describe('openlayers_VectorTileStyles', function () {
246246 var styleRegion = vectorTileStyles . getFeatureStyle ( featureRegion ) ;
247247 setTimeout ( function ( ) {
248248 expect ( styleRegion ) . not . toBeNull ( ) ;
249- expect ( styleRegion . fill_ . color_ ) . toBe ( "rgba(255,255,255,1)" ) ;
250- expect ( styleRegion . stroke_ . color_ ) . toBe ( "rgba(120,113,102,0)" ) ;
251- expect ( styleRegion . stroke_ . width_ ) . toEqual ( 0.94488 ) ;
252- expect ( styleRegion . stroke_ . lineJoin_ ) . toBe ( "round" ) ;
253- expect ( styleRegion . stroke_ . miterLimit_ ) . toEqual ( 10 ) ;
249+ expect ( styleRegion . getFill ( ) . getColor ( ) ) . toBe ( "rgba(255,255,255,1)" ) ;
250+ expect ( styleRegion . getStroke ( ) . getColor ( ) ) . toBe ( "rgba(120,113,102,0)" ) ;
251+ expect ( styleRegion . getStroke ( ) . getWidth ( ) ) . toEqual ( 0.94488 ) ;
252+ expect ( styleRegion . getStroke ( ) . getLineJoin ( ) ) . toBe ( "round" ) ;
253+ expect ( styleRegion . getStroke ( ) . getMiterLimit ( ) ) . toEqual ( 10 ) ;
254254 vectorTileStyles = null ;
255255 done ( ) ;
256256 } , 1000 ) ;
@@ -345,10 +345,10 @@ describe('openlayers_VectorTileStyles', function () {
345345 var styleLine = vectorTileStyles . getFeatureStyle ( featureLine ) ;
346346 setTimeout ( function ( ) {
347347 expect ( styleLine ) . not . toBeNull ( ) ;
348- expect ( styleLine . stroke_ . color_ ) . toBe ( "rgba(232,212,85,1)" ) ;
349- expect ( styleLine . stroke_ . width_ ) . toEqual ( 3.77952 ) ;
350- expect ( styleLine . stroke_ . lineJoin_ ) . toBe ( "round" ) ;
351- expect ( styleLine . stroke_ . miterLimit_ ) . toEqual ( 10 ) ;
348+ expect ( styleLine . getStroke ( ) . getColor ( ) ) . toBe ( "rgba(232,212,85,1)" ) ;
349+ expect ( styleLine . getStroke ( ) . getWidth ( ) ) . toEqual ( 3.77952 ) ;
350+ expect ( styleLine . getStroke ( ) . getLineJoin ( ) ) . toBe ( "round" ) ;
351+ expect ( styleLine . getStroke ( ) . getMiterLimit ( ) ) . toEqual ( 10 ) ;
352352 } , 1000 ) ;
353353 // featureRegionJSON通过JSON.stringify((new ol.format.GeoJSON()).writeFeatureObject(feature)获得,其中feature为视野范围内背景面对象
354354 var featureRegionJSON = {
@@ -370,11 +370,11 @@ describe('openlayers_VectorTileStyles', function () {
370370 setTimeout ( function ( ) {
371371 expect ( styleRegion ) . not . toBeNull ( ) ;
372372 expect ( styleRegion . length ) . toEqual ( 1 ) ;
373- expect ( styleRegion [ 0 ] . fill_ . color_ ) . toBe ( "rgba(8, 48, 75, 1)" ) ;
374- expect ( styleRegion [ 0 ] . stroke_ . color_ ) . toBe ( "rgba(0, 0, 0, 0)" ) ;
375- expect ( styleRegion [ 0 ] . stroke_ . width_ ) . toEqual ( 1 ) ;
376- expect ( styleRegion [ 0 ] . stroke_ . lineJoin_ ) . toBe ( "round" ) ;
377- expect ( styleRegion [ 0 ] . stroke_ . miterLimit_ ) . toEqual ( 10 ) ;
373+ expect ( styleRegion [ 0 ] . getFill ( ) . getColor ( ) ) . toBe ( "rgba(8, 48, 75, 1)" ) ;
374+ expect ( styleRegion [ 0 ] . getStroke ( ) . getColor ( ) ) . toBe ( "rgba(0, 0, 0, 0)" ) ;
375+ expect ( styleRegion [ 0 ] . getStroke ( ) . getWidth ( ) ) . toEqual ( 1 ) ;
376+ expect ( styleRegion [ 0 ] . getStroke ( ) . getLineJoin ( ) ) . toBe ( "round" ) ;
377+ expect ( styleRegion [ 0 ] . getStroke ( ) . getMiterLimit ( ) ) . toEqual ( 10 ) ;
378378 vectorTileStyles = null ;
379379 done ( ) ;
380380 } , 1000 ) ;
0 commit comments