From 8e01b373b75635b3a2700778eaa871bf4db25ae1 Mon Sep 17 00:00:00 2001 From: Leon Xu Date: Tue, 3 May 2022 15:21:45 -0700 Subject: [PATCH] doc: add setMapCenter and setMapZoom --- src/App.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/App.js b/src/App.js index 89c2fd0..5e29590 100644 --- a/src/App.js +++ b/src/App.js @@ -62,6 +62,8 @@ function App() { .then((data) => { setCountry(countryCode); setCountryInfo(data); + setMapCenter([data.countryInfo.lat, data.countryInfo.long]); + setMapZoom(4); }); };