# Google Maps onebox issues

**URL:** <https://meta.discourse.org/t/google-maps-onebox-issues/27989>\
**Category:** Bug\
**Created:** [April 27, 2015, 10:24am UTC](https://meta.discourse.org/t/google-maps-onebox-issues/27989 "2015-04-27T10:24:46Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![elberet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elberet/32/122404_2.png) [@elberet](https://meta.discourse.org/u/elberet)\
**Post date:** [April 27, 2015, 7:14pm UTC](https://meta.discourse.org/t/google-maps-onebox-issues/27989/10 "2015-04-27T19:14:56Z")

</div>

I have a fix here:

[https://github.com/discourse/onebox/pull/293](https://github.com/discourse/onebox/pull/293)

This is a “best effort” solution.

1. Previews _must be static images_ or else each update of the composer preview pane would cause a reload of the embedded iframe. Google would probably consider this abuse, and browser performance would plummet straight to hell.

2. I can only display static maps using data found in any of the available URLs that directly maps to data the static map API will accept. This is _not_ the case for the `cid` field that contains the ID of the custom map, let alone the protobuf-encoded `data` field in the source URL. Thus, markers placed on custom maps will not appear on any previews.

3. For a reason I have not (yet) figured out, Google’s webserver does sometimes, but not always, redirect @RaceProUK’s source URLs to the “canonical” Google maps URL. This seems to be totally random and may or may not be a transient problem. The engine now tries up to 10 times to get the canonical URL; if this fails, it constructs a fallback more or less blindly, based on assumptions and circumstancial evidence regarding the encoding of the `data` parameter.

---

_[View the full topic](https://meta.discourse.org/t/google-maps-onebox-issues/27989)._
