_applyConstraints(props) {
    // Normalize degrees
    props.longitude = mod(props.longitude + 180, 360) - 180;
    props.bearing = mod(props.bearing + 180, 360) - 180;

    // Ensure zoom is within specified range
    const {maxZoom, minZoom, zoom} = props;
    props.zoom = zoom > maxZoom ? maxZoom : zoom;
    props.zoom = zoom < minZoom ? minZoom : zoom;

    // Ensure pitch is within specified range
    const {maxPitch, minPitch, pitch} = props;

    props.pitch = pitch > maxPitch ? maxPitch : pitch;
    props.pitch = pitch < minPitch ? minPitch : pitch;

    return props;
  }
// Apply any constraints (mathematical or defined by _viewportProps) to map state
Apply any constraints (mathematical or defined by _viewportProps) to map state
Apply any constraints ( mathematical or defined by _viewportProps ) to map state
_applyConstraints(props) {
    props.longitude = mod(props.longitude + 180, 360) - 180;
    props.bearing = mod(props.bearing + 180, 360) - 180;
    const {maxZoom, minZoom, zoom} = props;
    props.zoom = zoom > maxZoom ? maxZoom : zoom;
    props.zoom = zoom < minZoom ? minZoom : zoom;
    const {maxPitch, minPitch, pitch} = props;
    props.pitch = pitch > maxPitch ? maxPitch : pitch;
    props.pitch = pitch < minPitch ? minPitch : pitch;
    return props;
  }
_applyConstraints ( props ) { props . longitude = mod ( props . longitude + 180 , 360 ) - 180 ; props . bearing = mod ( props . bearing + 180 , 360 ) - 180 ; const { maxZoom , minZoom , zoom } = props ; props . zoom = zoom > maxZoom ? maxZoom : zoom ; props . zoom = zoom < minZoom ? minZoom : zoom ; const { maxPitch , minPitch , pitch } = props ; props . pitch = pitch > maxPitch ? maxPitch : pitch ; props . pitch = pitch < minPitch ? minPitch : pitch ; return props ; }
Apply any constraints (mathematical or defined by _viewportProps) to map state
Apply any constraints ( mathematical or defined by _viewportProps ) to map state
// Normalize degrees // Ensure zoom is within specified range // Ensure pitch is within specified range