spicywebau / craft-embedded-assets

Manage YouTube videos, Instagram photos and more as first class assets in Craft CMS
MIT License
171 stars 36 forks source link

Google Map Embed displays max Zoom level #277

Open laurabennett opened 2 weeks ago

laurabennett commented 2 weeks ago

Bug Description

Related to #256 The map no longer errors when using the embed link but it is max zoomed in so all I see is green (map background color)

Steps to reproduce

  1. From Google Map click share, copy link to share
  2. Paste url into Embedded Assets
  3. Display iframeCode or html output

Expected behaviour

Expected same zoom level as when using the browser bar url, I think the default is around 8 or 9?

Embedded Assets version

5.2.0

Craft CMS version

5.4.9

ttempleton commented 1 week ago

Your map URL from https://github.com/spicywebau/craft-embedded-assets/issues/256#issuecomment-2239746570 is saving the embedded asset at zoom level 12.5 for me - what level (if any) is it saving in the JSON file for you?

laurabennett commented 1 week ago

{ "title": "Cannon Mountain · Franconia, NH 03580", "description": "★★★★★ · Mountain peak", "url": "https://www.google.com/maps/place/Cannon+Mountain/@44.1570355,-71.7070815,4449m/data=!3m1!1e3!4m6!3m5!1s0x4cb47c4e9d3f610d:0x7bfd503e2518c310!8m2!3d44.1564536!4d-71.6984172!16zL20vMDZ2X2Nf?coh=225988&entry=tts&g_ep=EgoyMDI0MTEwNS4wIPu8ASoASAFQAw%3D%3D", "feeds": [], "image": "https://lh5.googleusercontent.com/p/AF1QipOZfdGmXwdb3Mq3RsaxjEZx8s7_BQP2lgGb0gv0=w900-h900-p-k-no", "code": "<iframe src=\"https://www.google.com/maps/embed/v1/view?center=44.1570355%2C-71.7070815&zoom=4449m&key=AIzaSyDNNf-kmdPuqiH5P7Crjp2-qi-LKkzTQdo\"></iframe>", "width": 0, "height": 0, "aspectRatio": 0, "authorName": "", "authorUrl": "", "providerIcon": null, "providerName": "Google Maps", "providerUrl": "https://www.google.com", "publishedTime": null, "license": null, "cms": null, "favicon": "https://www.google.com/images/branding/product/ico/maps15_bnuw3a_32dp.ico", "keywords": [], "language": "en", "languages": [], "redirect": "", "type": "rich" }

ttempleton commented 4 days ago

Thanks for that - I think we might be mishandling share links for specific places. We'll look into it and I'll update here when we have more.