Important Note about using the Google Maps API from Desktop Apps

来源:转载

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.

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 thescript 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>

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

Using the Google Maps API V3 from Delphi – Part I Basic functionality Using the Google Maps API V3 from Delphi – Part II Styled Maps Using the Google Maps API V3 from Delphi – Part III Getting the latitude and longitude of a mouse click https://code.google.com/p/gmaps-api-issues/issues/detail?id=8750 https://code.google.com/p/gmaps-api-issues/issues/detail?id=8754

RegardsRodrigo.


分享给朋友:
您可能感兴趣的文章:
随机阅读: