Loading a URL with lat/lng/zoom specified does not work (#414)

This commit is contained in:
Nat Hillard 2021-07-27 20:51:35 -04:00 committed by GitHub
commit 3238e09792
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 27168 additions and 58 deletions

View file

@ -51,6 +51,7 @@ export interface IDetailViewInterface {
};
const J40Map = ({location}: IJ40Interface) => {
// Hash portion of URL is of the form #zoom/lat/lng
const [zoom, lat, lng] = location.hash.slice(1).split('/');
const [viewport, setViewport] = useState<ViewportProps>({
latitude: lat && parseFloat(lat) || constants.DEFAULT_CENTER[0],