4

I'm displaying Google maps in China, the API there uses HTTP. However, my website is HTTPS.

Chrome, and any other mainstream browser throws a Mixed Content error.

How do I overcome this?

jww
  • 97,681
  • 90
  • 411
  • 885
tt_Gantz
  • 2,786
  • 3
  • 23
  • 43
  • I'm afraid there is no easy solution. https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content/How_to_fix_website_with_mixed_content. Probably you can include maps in China via iframe element. – xomena Sep 30 '16 at 14:38
  • Hello @tt_Gantz, I am facing the same problem and I can't seem to find a solution to this. Did you find one ? – kbaccouche Oct 14 '16 at 08:29
  • @kbaccouche not really, we're only enabling HTTPS on pages with sensitive data for now, which thankfully don't have google maps information. Still looking for a good fix – tt_Gantz Oct 16 '16 at 03:52
  • @kbaccouche Just posted our solution. Hope it helps – tt_Gantz Nov 26 '18 at 03:47

1 Answers1

0

Was not able to find an easy solution with Google Maps.

However, using Gaode Maps ( 高德地图 ) helps was an alternative for Chinese based clients on sites HTTPS is needed.

They have an SDK with English instructions and similar functionality and coverage to Google Maps.

It is slower than Google Maps for non-China based users but is still okay to use. You could detect the user's location and use Google Maps and Gaode Maps as needed.

tt_Gantz
  • 2,786
  • 3
  • 23
  • 43