How do I get the Google Maps API v3 to abandon touch support?

I am using a Delphi component based on the Chromium Embedded project . When navigating in test HTML with some Javascript code to access the Google Maps API, it displays controls for touch screen devices.

I saw that this issue has already been fixed in the svn project, but I'm going through hell to compile this stuff.

However, if I go to maps.google.com (and not my test HTML with Javascript), my component will display the controls for a non-touch enabled device.

So, I was wondering ... is there a way to get the Google Maps v3 API to accept me as a device without touching it?

EDIT: added user agent and test case below.

User Agent:

Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.36 (KHTML, like Gecko) Chrome/12.0.742.53 Safari/534.36

Test case:

<!DOCTYPE html>
<html>
  <head>
    <style type="text/css">
      html { height: 100% }
      body { height: 100%; margin: 0px; padding: 0px }
      #map_canvas { height: 100% }
    </style>
    <script type="text/javascript"
        src="http://maps.googleapis.com/maps/api/js?sensor=false&language=pt_BR&region=BR">
    </script>
    <script type="text/javascript">
      var map;
      function initialize() {
      var latlng_map = new google.maps.LatLng(-23.510700, -46.602300);
      var myOptions_map = {
      zoom: 15,
      center: latlng_map,
      mapTypeId: google.maps.MapTypeId.ROADMAP
      };
      map = new google.maps.Map(document.getElementById("map_canvas"),
      myOptions_map);
    }
    </script>
  </head>
  <body onload="initialize()">
    <div id="map_canvas" style="width:100%; height:100%"></div>
  </body>
</html>
+5
source share
1 answer

The Maps API relies on browsers to correctly display their capabilities (e.g. touchscreen). There is no reasonable way to force the API to abandon touch support.

0
source

All Articles