Using google map in my website (https secured) shows error

11,886

Solution 1

Yes,

As such we are happy to offer free access to the Maps API v3, Static Maps API, and Maps API Web Services over HTTPS to all developers from today. To load the Maps API v3 over HTTPS, the API must be loaded from the hostname maps-api-ssl.google.com. For the Static Maps API and Web Services, please use maps.googleapis.com.

Check out this official announcement from Google:

http://googlegeodevelopers.blogspot.com/2011/03/maps-apis-over-ssl-now-available-to-all.html

Solution 2

The bad news is if you use Google Maps - SSL API you will still sometimes get the Secure and Unsecured alert. Here is why:

Google url above displays everything under https:// to correctly display the under secured environment. However and this is a huge however issue Google now displays a picture of the building or location off to the left without https thus giving us the unsecured error we hate to get in a secured environment.

Here is a good example...take a look at the following:

https://maps-api-ssl.google.com/maps?q=1000+Ballpark+Way,+Arlington,+TX&hl=en&sll=37.0625,-95.677068&sspn=49.310476,101.425781&vpsrc=0&hnear=1000+Ballpark+Way,+Arlington,+Texas+76011&t=m&z=17

Now using Firefox or browser of your choice, right-click on the building image Info or Image Properties... and WOW! You will see that this image is causing your unsecured error when everything according to Google should be all secured behind the Google https://

The building and location images are not listed under https:// .... you will still get an error!

Check it out for yourself and you'll see what I'm seeing... so viewing Google maps behind SSL is still an issue unless someone knows of a work-a-round to get those location or building images removed or to be displayed behind https:// and not http:// such as the case below with the image itself.

Bottom line is... this is still an issue because of the photo images are not behind SSL...
Test it and you will see what I am talking about.

If anyone knows of a work-a-round for this, I'd sure like to know. Google if you have an explanation for this please let us know.

Share:
11,886
balanv
Author by

balanv

Experience : 7+ years of experience in core programming, project management, client communication and a serious COD Player..!! Skills : Magento, Ruby on Rails, NodeJs, Python, Java, Hadoop, Wordpress, Css, Golang etc.,

Updated on June 09, 2022

Comments

  • balanv
    balanv almost 2 years

    My website uses https secure pages, but when I use Google map API to bring in a map inside my website, it shows error (like webpage contains insecure items).But if I removed this Gmap api the error is gone.

    Is there any way like I can use google map in https secured pages without any errors like this.

  • Adnan
    Adnan about 13 years
    False; check out the article by Google: Maps APIs over SSL now available to all from Tuesday, March 15, 2011
  • Starjumper Tech SL
    Starjumper Tech SL over 8 years
    Although loading the maps services from hostname maps-api-ssl.google.com is indeed a solution, it does not fix the reported error in all cases, I am loading the google maps scripts from maps-api-ssl.google.com and still getting the 'Mixed Content' error