Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

set map maxZoom and default location #14

Merged
merged 1 commit into from
Feb 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/components/map/map-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ export const mapModel = {
storage.map.closePopup();
});
storage.map.on("zoom", resetTransitionAnimation);

// set to default location if user does not allow locating.
const defautLocation = [43.515391, -79.684085];
storage.map.setView(defautLocation, 12);
},

addMapBoxTileLayer: map => {
Expand All @@ -55,7 +59,7 @@ export const mapModel = {
},

locateUserAndSetView() {
storage.map.locate({ setView: true });
storage.map.locate({ setView: true, maxZoom: 12 });
},

setMapToCompanyAddress() {
Expand Down