I’m using a Delphi component based on the Chromium Embedded project. While navigating in a test HTML with some Javascript code to access Google Maps API, it displays the controls for touch enabled devices.
I’ve seen that this issue is already fixed in the project’s svn, but I’m going through hell to compile that stuff.
However, if I go to the maps.google.com website (and not my testing HTML with Javascript), my component will display the controls for a non-touch enabled device.
So, I was wondering… is there a way to force Google Maps v3 API to accept me as a non-touch device?
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®ion=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>
The Maps API relies on browsers correctly exposing their capabilities (e.g. touch enabled). There is no sane way to force the API to discard touch support.