@@ -46,9 +46,9 @@ import {
4646import { centerToMarkerSelector , getSelectedLayers , layersSelector , queryableLayersSelector , queryableSelectedLayersSelector , rawGroupsSelector , selectedNodesSelector } from '../selectors/layers' ;
4747import { modeSelector , getAttributeFilters , isFeatureGridOpen } from '../selectors/featuregrid' ;
4848import { spatialFieldSelector } from '../selectors/queryform' ;
49- import { mapSelector , projectionDefsSelector , projectionSelector , isMouseMoveIdentifyActiveSelector } from '../selectors/map' ;
49+ import { mapSelector , projectionSelector , isMouseMoveIdentifyActiveSelector } from '../selectors/map' ;
5050import { boundingMapRectSelector } from '../selectors/maplayout' ;
51- import { centerToVisibleArea , isInsideVisibleArea , isPointInsideExtent , reprojectBbox } from '../utils/CoordinatesUtils' ;
51+ import { centerToVisibleArea , isInsideVisibleArea } from '../utils/CoordinatesUtils' ;
5252import { floatingIdentifyDelaySelector } from '../selectors/localConfig' ;
5353import { createControlEnabledSelector , measureSelector } from '../selectors/controls' ;
5454import { localizedLayerStylesEnvSelector } from '../selectors/localizedLayerStyles' ;
@@ -272,11 +272,6 @@ export const zoomToVisibleAreaEpic = (action$, store) =>
272272 return Rx . Observable . from ( [ updateCenterToMarker ( 'disabled' ) , hideMapinfoMarker ( ) ] ) ;
273273 }
274274 const map = mapSelector ( state ) ;
275- const mapProjection = projectionSelector ( state ) ;
276- const projectionDefs = projectionDefsSelector ( state ) ;
277- const currentprojectionDefs = find ( projectionDefs , { 'code' : mapProjection } ) ;
278- const projectionExtent = currentprojectionDefs && currentprojectionDefs . extent ;
279- const reprojectExtent = projectionExtent && reprojectBbox ( projectionExtent , mapProjection , "EPSG:4326" ) ;
280275 const boundingMapRect = boundingMapRectSelector ( state ) ;
281276 const coords = action . point && action . point && action . point . latlng ;
282277 const resolution = getCurrentResolution ( Math . round ( map . zoom ) , 0 , 21 , 96 ) ;
@@ -300,9 +295,6 @@ export const zoomToVisibleAreaEpic = (action$, store) =>
300295 if ( ! map || ! layoutBounds || ! coords || action . point . cartographic || isFeatInsideVisibleArea || isMouseMoveIdentifyActiveSelector ( state ) || skipZooming ) {
301296 return Rx . Observable . of ( updateCenterToMarker ( 'disabled' ) ) ;
302297 }
303- if ( reprojectExtent && ! isPointInsideExtent ( coords , reprojectExtent ) ) {
304- return Rx . Observable . empty ( ) ;
305- }
306298 const center = centerToVisibleArea ( coords , map , layoutBounds , resolution ) ;
307299 if ( featureBbox && isQueryJustOneLayer ) {
308300 return Rx . Observable . of ( updateCenterToMarker ( 'enabled' ) , zoomToExtent ( featureBbox , center . crs ) ) ;
0 commit comments