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8B,UAAW7B,EACXI,SAAUL,EAAM,IAAMC,EACtB4F,MAAoB,QAAfJ,EAACpF,EAASoB,aAAK,IAAAgE,OAAA,EAAdA,EAAgBI,MACtBC,OAAO,KAIfb,EAAS,aAAc,CACnBxD,MAAO,CACHC,SAAU1B,EACV8B,UAAW7B,EACXI,SAAUL,EAAM,IAAMC,EACtB4F,MAAoB,QAAfH,EAACrF,EAASoB,aAAK,IAAAiE,OAAA,EAAdA,EAAgBG,MACtBC,OAAO,EACPG,YAA2B,QAAhBN,EAAEtF,EAASoB,aAAK,IAAAkE,OAAA,EAAdA,EAAgBO,gBAC7BF,SAAwB,QAAhBJ,EAAEvF,EAASoB,aAAK,IAAAmE,OAAA,EAAdA,EAAgBI,WAItC,EASqI/D,SAAC,uBAEnI,C","sources":["views/daftar-alamat/google-maps.js"],"sourcesContent":["import { GoogleMap, MarkerF, useLoadScript } from \"@react-google-maps/api\";\r\nimport { useMemo, useEffect, useState } from \"react\";\r\nimport usePlacesAutocomplete, { getGeocode, getLatLng } from \"use-places-autocomplete\";\r\nimport { Combobox } from \"@headlessui/react\";\r\nimport { useNavigate, useLocation, redirect } from 'react-router-dom'\r\n\r\nconst libraries = ['places']\r\n\r\nconst Maps = () => {\r\n const navigate = useNavigate()\r\n const location = useLocation()\r\n \r\n const [lat, setLat] = useState(location.state?.latitude ?? 0)\r\n const [lng, setLng] = useState(location.state?.longitude ?? 0)\r\n \r\n \r\n const { isLoaded } = useLoadScript({\r\n googleMapsApiKey: 'AIzaSyBHxUVFaT8j2kyhWZRJRraJ-d1z4k5cqlQ',\r\n libraries\r\n })\r\n console.log(location.state);\r\n const handleMapsNavigation = (e) => {\r\n var state = {\r\n latitude: lat,\r\n longitude: lng,\r\n location: lat + ',' + lng,\r\n input:location.state?.input,\r\n isPin: true,\r\n }\r\n\r\n if(location.state?.id) {\r\n state.id = location.state.id\r\n }\r\n\r\n \r\n if (location.state?.redirect === '/tambah_alamat') {\r\n navigate('/tambah_alamat', { \r\n state: {\r\n latitude: lat,\r\n longitude: lng,\r\n location: lat + ',' + lng,\r\n input:location.state?.input,\r\n isPin: true,\r\n }\r\n })\r\n } else {\r\n navigate('/tambah_eq', { \r\n state: {\r\n latitude: lat,\r\n longitude: lng,\r\n location: lat + ',' + lng,\r\n input:location.state?.input,\r\n isPin: true,\r\n activeRadio: location.state?.currentNavigate,\r\n redirect: location.state?.redirect\r\n }\r\n })\r\n // console.log(states)\r\n }\r\n\r\n }\r\n\r\n return (\r\n <>\r\n
Latitude: { lat }
Longitude: { lng }