@@ -54,7 +54,6 @@ export default class FeatureService {
5454 const serviceExtent = this . serviceMetadata . extent
5555 if ( serviceExtent . spatialReference . wkid === 4326 ) {
5656 this . _setBounds ( [ serviceExtent . xmin , serviceExtent . ymin , serviceExtent . xmax , serviceExtent . ymax ] )
57- this . _clearAndRefreshTiles ( )
5857 } else {
5958 this . _projectBounds ( )
6059 }
@@ -66,6 +65,7 @@ export default class FeatureService {
6665
6766 this . _setAttribution ( )
6867 this . enableRequests ( )
68+ this . _clearAndRefreshTiles ( )
6969 } )
7070 }
7171
@@ -163,8 +163,10 @@ export default class FeatureService {
163163 const bounds = this . _map . getBounds ( ) . toArray ( )
164164 const primaryTile = tilebelt . bboxToTile ( [ bounds [ 0 ] [ 0 ] , bounds [ 0 ] [ 1 ] , bounds [ 1 ] [ 0 ] , bounds [ 1 ] [ 1 ] ] )
165165
166- if ( this . _esriServiceOptions . useSeviceBounds && ! this . _doesTileOverlapBbox ( this . _maxExtent , bounds ) ) {
167- return
166+ if ( this . _esriServiceOptions . useSeviceBounds ) {
167+ if ( this . _maxExtent [ 0 ] !== - Infinity && ! this . _doesTileOverlapBbox ( this . _maxExtent , bounds ) ) {
168+ return
169+ }
168170 }
169171
170172 // If we're not using a static zoom level we'll round to the nearest even zoom level
@@ -399,7 +401,6 @@ export default class FeatureService {
399401 . then ( ( data ) => {
400402 const extent = data . geometries [ 0 ]
401403 this . _maxExtent = [ extent . xmin , extent . ymin , extent . xmax , extent . ymax ]
402- this . _clearAndRefreshTiles ( )
403404 } )
404405 . catch ( ( error ) => {
405406 // if projection endpoint has already been set to fallback, do not re-request project bounds
0 commit comments