Quantcast
Channel: The Road to Delphi
Viewing all articles
Browse latest Browse all 71

Important Note about using the Google Maps API from Desktop Apps

$
0
0

If you are experimenting some strange issues (maps goes blank, some elements of the maps are not displayed) using the Google Maps API from a desktop application.

GoogleMapsError

This is because the JavaScript API v3 no longer supports the IE7 and IE8 rendering mode, as is stated on this document https://developers.google.com/maps/documentation/javascript/browsersupport.

 

The workaround is very simple just add the V=3 parameter to the script tag, So if you script looks like this

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>

Change to

<script type="text/javascript" src="http://maps.google.com/maps/api/js?v=3&sensor=true"></script>

 

Note  :   If you do not explicitly specify a version in your JavaScript API bootstrap request, you will receive the experimental version by default (3.22) which not longer supports the IE8.

 

GoogleMapsOK

Another option is tweak the Windows registry how is shown here.

By the way I just updated all the Google Maps related code of this blog (Check the updated code on Github).

Some additional references

 

Regards
Rodrigo.



Viewing all articles
Browse latest Browse all 71