Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
};
}
if (newPos === null) {
newPos = {
lat: nextProps.locationClicked.lat,
lng: nextProps.locationClicked.lng,
locationType: nextProps.locationClicked.locationType
};
}
this.handleViewportChange({
latitude: newPos.lat,
longitude: newPos.lng,
zoom: newPos.locationType === LocationTypes.HOME ? 17 : 18,
transitionInterpolator: experimental.viewportFlyToInterpolator,
transitionDuration: 1200
});
if (this.state.viewport.zoom < 15) {
this.props.onClearLocation();
}
}