From 8ec31a1344096875fb2db29c850d7854a87a0faf Mon Sep 17 00:00:00 2001 From: log101 Date: Mon, 15 Jan 2024 14:11:06 +0300 Subject: [PATCH] feat: add google maps js sdk --- package-lock.json | 9 ++++++++ package.json | 3 +++ src/env.d.ts | 1 + src/layouts/Layout.astro | 46 +++++++++++++++++++++++++++++++++++++++- src/pages/index.astro | 30 ++++++++++++++------------ 5 files changed, 75 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1ceafab..bc504b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,6 +25,9 @@ "tailwindcss": "^3.4.1", "tailwindcss-animate": "^1.0.7", "typescript": "^5.3.3" + }, + "devDependencies": { + "@types/google.maps": "^3.54.10" } }, "node_modules/@alloc/quick-lru": { @@ -1322,6 +1325,12 @@ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" }, + "node_modules/@types/google.maps": { + "version": "3.54.10", + "resolved": "https://registry.npmjs.org/@types/google.maps/-/google.maps-3.54.10.tgz", + "integrity": "sha512-N6gwM01mKhooXaw+IKbUH7wJcIJCn8U60VoaVvom5EiQjmfgevhQ+0+/r17beXW5j8ad2x+WPr0iyOUodCw4/w==", + "dev": true + }, "node_modules/@types/hast": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.3.tgz", diff --git a/package.json b/package.json index 5c8ee09..afb1c48 100644 --- a/package.json +++ b/package.json @@ -27,5 +27,8 @@ "tailwindcss": "^3.4.1", "tailwindcss-animate": "^1.0.7", "typescript": "^5.3.3" + }, + "devDependencies": { + "@types/google.maps": "^3.54.10" } } diff --git a/src/env.d.ts b/src/env.d.ts index f964fe0..d0c240b 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -1 +1,2 @@ /// +/// diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 6455be5..8cf4171 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -1,5 +1,5 @@ --- - +const googleSdkKey = import.meta.env.MAPS_SDK_KEY; --- @@ -10,6 +10,50 @@ + Konulu Konum diff --git a/src/pages/index.astro b/src/pages/index.astro index fa5fb54..54febdc 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -12,14 +12,11 @@ import { import { CalendarIcon } from '@radix-ui/react-icons'; import { LockClosedIcon } from '@radix-ui/react-icons'; - -const apiKey = import.meta.env.MAPS_SDK_KEY; -const mapSrc = `https://www.google.com/maps/embed/v1/place?q=place_id:ChIJpSDn9V25yhQRsA2NsrXtDp8&key=${apiKey}`; ---
- + Ayşe @@ -35,15 +32,7 @@ const mapSrc = `https://www.google.com/maps/embed/v1/place?q=place_id:ChIJpSDn9V - - - +
+ +