I've implemented Virtual Earth within many web applications, but one thing that I've only had to do a couple times is run the site under SSL. If you have ever done this, then you know that the web browser doesn't like this and complains with the "Do you want to display nonsecure items?" prompt. This can be a pain for users, escpecially when they click "No" and then wonder why the map isn't there.
Is SSL Supported?
Yes, even though it isn't documented, Virtual Earth does support being referenced under SSL. The reason I know this without it being documented is because David Barkol has blogged about it here. This is the only place I've found it mentioned, and it's not as simple as just using HTTPS.
How to reference Virtual Earth under SSL
To reference Virtual Earth v6 using SSL you must pass "s=1" in the querystring, as well as use HTTPS.
Here's the full URL to reference Virtual Earth using SSL:
Why do we need "s=1"?
You'd think that by just referencing Virtual Earth using HTTPS you'd be all set. Even though you load the VE script using SSL, VE still requests all map images without SSL, thus causing the prompt to still pop up.
By adding "s=1" to the querystring, you are telling VE to load the map images and other stuff it references using SSL. Doing this removes the annoying prompt from coming up, and eliminating any user confusion when they click "No".
Now, you're probably wondering the same thing I am, "Why doesn't VE just see the HTTPS and reference everything accordingly?" Well, I'm not quite sure, but this may be something they change in a future release.
- 10 Oct 2020
- 01 Jul 2020
- 06 Apr 2020
- 11 Mar 2020
- 15 Feb 2020
Recent on Build5Nines.com
- 04 Dec 2020
Latest Cloud News: Apple on K8s, IoT, Microsoft Pluton and more! (November 20, 2020 Build5Nines Weekly)20 Nov 2020
Latest Cloud News: .NET 5 Released, Apple Silicon M1 CPU, and more! (November 12, 2020 Build5Nines Weekly)12 Nov 2020
- 11 Nov 2020
Latest Cloud News: Kubernetes, Terraform, Teams Multi-Login and more! (November 5, 2020 Build5Nines Weekly)05 Nov 2020
This site is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com. We also participates in affiliate programs with Udemy, and other sites. This site is compensated for referring traffic and business to these companies.