Frage

I do start a new application, using QT I wish to integrate google map 3.xx since 2 is deprecated... I have read alot on that subject But I still have the problem that my qwebview won't scroll to zoom and mouse dragging won't pan.

I have tried the chrome\1.0 trick I found an app that work buts look likes its using V2 of the api.

The fancy browser is working on google map but not on the V3 api samples. Is google map still on V2?

Here is my html I load:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <title>Google Maps</title>

    <style type="text/css">
        html { height: 100% }
        body { height: 100%; margin: 0; padding: 0 }
        #map_canvas { height: 100% }
    </style>

    <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?v=3.1&key=AIzaSyBYP5yP4W0i0fL6MKVRSA3J8-jUs2p2jfE&sensor=false"></script>
    <script type="text/javascript">
        function load() { 
            naviOptions = {
                position: google.maps.ControlPosition.TOP_LEFT,
                style: google.maps.NavigationControlStyle.ZOOM_PAN
            }

            var mapOptions = {
                center: new google.maps.LatLng(-34.397, 150.644),
                zoom: 8,
                mapTypeId: google.maps.MapTypeId.ROADMAP,
                keyboardShortcuts: true,
                mapTypeControl: true,
                navigationControl: true,
                scrollwheel: true,
                disableDoubleClickZoom: false,
                navigationControlOptions: naviOptions
            };

            var map = new google.maps.Map(document.getElementById("map"), mapOptions);

            map.setUIToDefault();


        }
    </script>
  </head>
  <body onload="load()">
    <div id="map" style="width:100%; height:100%""></div>
  </body>
</html>

The only thing I haven't tried yet is recompiling the qwebkit with out supporting touch. Anyone got it working?

War es hilfreich?

Lösung

http://qt-project.org/forums/viewthread/19887 Setting application name and version to chrome 1.0 do work under windows

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top