From 9a10da6afb53d353a7606e334d44a3a619d8b9f8 Mon Sep 17 00:00:00 2001 From: KjellBerlin Date: Mon, 23 Sep 2024 16:48:51 +0200 Subject: [PATCH 1/2] Google maps link for mobile --- src/main/kotlin/com/carbonara/core/address/Address.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/com/carbonara/core/address/Address.kt b/src/main/kotlin/com/carbonara/core/address/Address.kt index 9c4ab75..d549e66 100644 --- a/src/main/kotlin/com/carbonara/core/address/Address.kt +++ b/src/main/kotlin/com/carbonara/core/address/Address.kt @@ -18,7 +18,7 @@ data class Address( } fun createGoogleMapsLink(): String { - return "https://www.google.com/maps/place/?q=place_id:$googlePlaceId" + return "https://www.google.com/maps/search/?api=1&query=%20&query_place_id=$googlePlaceId" } } From 5e302cabbdce7b4520a373000f3dc593796735fc Mon Sep 17 00:00:00 2001 From: KjellBerlin Date: Mon, 23 Sep 2024 16:50:51 +0200 Subject: [PATCH 2/2] Google maps link for mobile --- src/test/kotlin/com/carbonara/core/address/AddressTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/kotlin/com/carbonara/core/address/AddressTest.kt b/src/test/kotlin/com/carbonara/core/address/AddressTest.kt index 05a3455..f2ee59b 100644 --- a/src/test/kotlin/com/carbonara/core/address/AddressTest.kt +++ b/src/test/kotlin/com/carbonara/core/address/AddressTest.kt @@ -31,7 +31,7 @@ class AddressTest { @Test fun `Happy case - googleMapsLink`() { val result = ADDRESS.createGoogleMapsLink() - assertEquals("https://www.google.com/maps/place/?q=place_id:$GOOGLE_PLACE_ID", result) + assertEquals("https://www.google.com/maps/search/?api=1&query=%20&query_place_id=$GOOGLE_PLACE_ID", result) } companion object {