Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 868
balanv Avatar asked Apr 25 '11 10:04

balanv


2 Answers

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

like image 84
Adnan Avatar answered Nov 14 '22 03:11

Adnan


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.

like image 40
RFX Avatar answered Nov 14 '22 02:11

RFX