Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Options for Google Maps over SSL

We recently discovered that the Google Maps API does not play nicely with SSL. Fair enough, but what are some options for overcoming this that others have used effectively?

Will the Maps API work over SSL (HTTPS)?

At this time, the Maps API is not available over a secure (SSL) connection. If you are running the Maps API on a secure site, the browser may warn the user about non-secure objects on the screen.

We have considered the following options

  1. Splitting the page so that credit card collection (the requirement for SSL) is not on the same page as the Google Map.
  2. Switching to another map provider, such as Virtual Earth. Rumor has it that they support SSL.
  3. Playing tricks with IFRAMEs. Sounds kludgy.
  4. Proxying the calls to Google. Sounds like a lot of overhead.

Are there other options, or does anyone have insight into the options that we have considered?

like image 520
Brad Tutterow Avatar asked Aug 06 '08 14:08

Brad Tutterow


People also ask

Can you use Google Maps API without credit card?

It is still possible to enable Maps API without billing, but it has to be done through the Cloud SDK console.

Is Google Maps API no longer free?

You won't be charged until your usage exceeds $200 in a month. Note that the Maps Embed API, Maps SDK for Android, and Maps SDK for iOS currently have no usage limits and are at no charge (usage of the API or SDKs is not applied against your $200 monthly credit).

Can I use Google Maps API?

Yes, Google Maps Platform products can now be used in non-Web applications, provided that they adhere to the other restrictions of the Google Maps Platform Terms of Service. The Maps JavaScript API is only supported when run in one of the supported browsers.


3 Answers

I'd agree with the previous two answers that in this instance it may be better from a usability perspective to split the two functions into separate screens. You really want your users to be focussed on entering complete and accurate credit card information, and having a map on the same screen may be distracting.

For the record though, Virtual Earth certainly does fully support SSL. To enable it you simple need to change the script reference from http:// to https:// and append &s=1 to the URL, e.g.

<script src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1" type="text/javascript"></script>

becomes

<script src="https://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1&s=1" type="text/javascript"></script>
like image 188
Gary Avatar answered Sep 25 '22 01:09

Gary


Just to add to this

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

Haven't tried migrating my SSL maps (ended up using Bing maps api) back to Google yet but might well be on the cards.

like image 27
Pasted Avatar answered Sep 26 '22 01:09

Pasted


This seems like a buisness requirements/usability issue - do you have a good reason for putting the map on the credit card page? If so, maybe it's worth working through some technical problems.

You might try using Mapstraction, so you can switch to a provider that supports SSL, and switch back to Google if they support it in the future.

like image 24
palmsey Avatar answered Sep 26 '22 01:09

palmsey