Sorry! Something went wrong - google map shortcode

I have google map shortcode in footer on website -> http://www.centrallondontoastmasters.co.uk

However when the site runs I get Sorry Something went wrong.

Java console reports:
Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error

Here is the shortcode
[google_map lat=“51.5040264” lng="-0.08144" zoom=“15” drag=“true” height=“60%”][google_map_marker lat=“51.5046277” lng="-0.0835002" info=“Upstairs @ The Shipwrights Arms, 88 Tooley Street, London SE1 2TF”][/google_map]

What is confusing is I have another site http://www.londonpublicspeakers.co.uk/ where this is working fine.

2 queries.
A) Why am I seeing this error on http://www.centrallondontoastmasters.co.uk and not http://www.londonpublicspeakers.co.uk/
B) How can I add a google API key to the shortcode (I have a key)

Many thanks
Mark

Hey,

Please check this link:http://theme.co/x/demo/integrity/1/shortcodes/map/
Both (map and google map element) are still embed version.

  1. You can embed a map using “Map Embed” element. We are not using any API for this. You just uses embed code generated by Google maps (maps.google.com).

  2. You can use our custom map integration that uses Google Maps API using “Google Map” element. We’re using Google Maps API for this and that way you can add markers on top of the map too. Google Map element is like using a self hosting video with all the possible options of hiding/showing controls and etc.

Hi John, thanks for reply.

Sorry I am probably being dumb here, but I don’t understand your reply.

  1. I cannot see a “Map Embed” Element in the Footer builder (See screenshot)

    I am using EXACTLY the same shortcode But 1 doesn’t work.

ON londonpublicspeakers.co.uk
[google_map lat=“51.5040264” lng="-0.08144" zoom=“15” drag=“true” height=“60%”][google_map_marker lat=“51.5046277” lng="-0.0835002" info=“Upstairs @ The Shipwrights Arms, 88 Tooley Street, London SE1 2TF”][/google_map]

ON centrallondontoastmasters.co.uk
[google_map lat=“51.5040264” lng="-0.08144" zoom=“15” drag=“true” height=“60%”][google_map_marker lat=“51.5046277” lng="-0.0835002" info=“Upstairs @ The Shipwrights Arms, 88 Tooley Street, London SE1 2TF”][/google_map]

Can you advise why ?

  1. I cannot find the Google Map element - is there a way to add the key using the shortcode - I cannot see any reference in the shortcode -> http://theme.co/x/demo/integrity/1/shortcodes/map/

Hi There,

Did you create an API for centrallondontoastmasters.co.uk ?

Please check if the API was probably created, it should work as it is.

Hope it helps

@Joao
Yes I have key correctly created for LondonPublicSpeakers.co.uk and CentralLondonToastmasters.co.uk

Neither keys have any key restriction (i.e. they are not restricted to a certain referrer)

Can you answer please the following, as you have not answered this, so I am unclear?
a) How do I add the key to the google_map shortcode?

b) Any other ideas as to why THE EXACT SAME MAP CODE - works on one site (http://www.londonpublicspeakers.co.uk) and not another (http://www.centrallondontoastmasters.co.uk)

a.) The Google Map shortcode API attribute is api_key. The full code should looks like this:

[x_google_map api_key="thisistheapi" lat="40.7056308" lng="-73.9780035" zoom="12" zoom_control="false" drag="false" height="" hue="false" no_container="false" ][/x_google_map]

b.) This is an API related issue. It would be best to contact Google Maps support for this. Please try adding in the API attribute and your API in the shortcode first.

Thanks.

Xian,

thanks that fixed it, thanks for your help

can I recommend you update the docs
http://theme.co/x/demo/integrity/1/shortcodes/map/
to include the ‘api_key’ attribute.

Many thanks

1 Like

You’re welcome. I’ve forwarded your request to the person who manages our demos.

Thanks.