center on user location

This commit is contained in:
muerwre 2018-08-27 17:28:10 +07:00
parent 0f368b189f
commit d39ec1588c
6 changed files with 149 additions and 4 deletions

5
src/utils/geolocation.js Normal file
View file

@ -0,0 +1,5 @@
export const getUserLocation = callback => {
if (!navigator || !navigator.geolocation) return;
navigator.geolocation.getCurrentPosition(callback);
};