Home>Support>Google Maps Widget: Static Image Error

Google Maps Widget: Static Image Error

Looks like if I choose a static image for the Google Maps Widget, the image does not render. If I paste the image url (https://maps.googleapis.com/maps/api/staticmap?center=17043%20El%20Camino%20Real%20#201%20Houston,%20TX%2077058&zoom=10&size=640×480&key=AIzaSyCzzi-6uEmEEZwwl4KIJ3G40jxiDj6ROfo&markers=17043%20El%20Camino%20Real%20#201%20Houston,%20TX%2077058) in my browser I get the API error:

The Google Maps API server rejected your request. Invalid request. Missing the ‘size’ parameter.

I have created an API key, so I don’t believe that is the issue. Please let me know if I’m doing something wrong or if this is a bug.

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 8 years, 1 month ago Alex S
    Hi, I Work Here

    Hi Kyle,

    Do you have a public URL where we can take a look at what’s going on? If you need to keep this URL private from other users, just select “Private Reply” on the bottom right of the comment box.

  2. 8 years, 1 month ago kylewhenderson

    Sorry for the delay. I just created a duplicate of the homepage but changed the Google Map to be a static image. It should be next to the "Centrally
    Located Houston Campus" section:

    http://texasschoolofmassage.jellyflea.net/static-google-map-test/

    [image: Inline image 1]

  3. 8 years, 1 month ago Alex S
    Hi, I Work Here

    Hi Kyle,

    The maps is reporting that it doesn’t have an API key. Can you confirm that you’ve added the API key to the project?

    If so, would it be possible for you to send me an export for this widget? To do this open up the page with the widget and click layout. Then click import / export and then click download. Please upload the export to a 3rd party file hosting site such as teknik.io.

  4. 8 years, 1 month ago kylewhenderson

    So sorry, but I have now added the API key back in (sorry I thought it already was). Here is a link to the resulting image src: https://maps.googleapis.com/maps/api/staticmap?center=17043%20El%20Camino%20Real%20#201%20Houston,%20TX%2077058&zoom=10&size=640×480&key=AIzaSyCzzi-6uEmEEZwwl4KIJ3G40jxiDj6ROfo&markers=17043%20El%20Camino%20Real%20#201%20Houston,%20TX%2077058

    It goes to a page that states “The Google Maps API server rejected your request. Invalid request. Missing the ‘size’ parameter.”

  5. 8 years, 1 month ago Alex S
    Hi, I Work Here

    Hi Kyle,

    Would it be possible for you to send me an export for this widget? To do this open up the page with the widget and click layout. Then click import / export and then click download. Please upload the export to a 3rd party file hosting site such as teknik.io.

  6. 8 years, 1 month ago kylewhenderson

    Here you go: https://dl.dropboxusercontent.com/u/14220946/layout-15082016.json

  7. 8 years, 1 month ago Alex S
    Hi, I Work Here

    Hi Kyle,

    Hm. Try removing # from the address.

  8. 8 years, 1 month ago kylewhenderson

    I believe that was the issue. Thanks!

  9. 8 years, 1 month ago Alex S
    Hi, I Work Here

    Hi Kyle,

    Awesome – let me know if you run into any other issues. I’ll log this as a bug so it doesn’t happen again in the future. Sorry about this!

  10. 8 years, 1 month ago kylewhenderson

    May have spoke too soon. Upon refreshing the page multiple times, it seems that the image only pulls up a 75% of the time or so. Additionally, the width and height variables don’t seem to work properly. I am adjusting the width but the image does not seem to change. I have tried manually adjusting this in the image url for testing and it doesn’t render a different image. I wonder if the parameters have changed.

  11. 8 years, 1 month ago kylewhenderson

    Either that or there is a limit of 640px?

  12. 8 years, 1 month ago Alex S
    Hi, I Work Here

    Hi Kyle,

    Free Google Maps API users are limited to 640×640. Premium users are allowed up to 2048×2048 but that’s expensive and basically out of reach for all intensive purposes.

  13. 8 years, 1 month ago kylewhenderson

    Yup, looks like larger images require a Google Maps API premium plan: https://developers.google.com/maps/documentation/static-maps/intro#Imagesizes

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More