Bug 58165

Summary: [Qt] Google maps Javascript API functionalities not working!
Product: WebKit Reporter: Raja Ravi Varma <ravi4frenz>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: benjamin, eunikolsky, ravi4frenz
Priority: P3 Keywords: Qt, QtTriaged
Version: 420+   
Hardware: S60 Hardware   
OS: S60 3rd edition   
Attachments:
Description Flags
Screenshots, sis packages, and the sample project. none

Description Raja Ravi Varma 2011-04-08 14:29:53 PDT
I have tried to display Google maps using their Javascript API, but the map cannot be zoomed either by the map's Zoom control or by Javascript functions. I have overridden the Application cursor to access the zoom control, yet it does not work.

It works well in FireFox. I have tested it in my mobile Nokia E63.
Comment 1 Raja Ravi Varma 2011-04-08 14:32:29 PDT
As I cannot attach the file with the browse option I'm copying the source of the HTML page with which I could produce the bug.

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

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Location Finder</title>
    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAgrj58PbXr2YriiRDqbnL1RSqrCjdkglBijPNIIYrqkVvD1R4QxRl47Yh2D_0C1l5KXQJGrbkSDvXFA" type="text/javascript"></script>
    <script type="text/javascript">
        function initialize() {
            var map = new GMap2(document.getElementById("map"));
            map.setCenter(new GLatLng(11.45000, 77.68000),10);
            var point = new GLatLng(11.45000, 77.68000);
            var marker = new GMarker(point);
            map.addOverlay(marker);
	 map.addControl(new GSmallMapControl());
	 map.setZoom(12);
        }

    function addNewMarker(newLocation) {
        var newLocationPoints = new GLatLng(newLocation);
        map.clearOverlays();
        var newPosition = new GMarker(newLocationPoints);
        map.addOverlay(newPosition);
        map.setCenter(newLocationPoints);
    }
       
        
    </script>
</head>
<body onload="initialize()">
<div id="map" style="width: 320px; height: 240px"></div>
</body>
</html>
Comment 2 Alexey Proskuryakov 2011-04-09 01:12:52 PDT
Works for me in Safari 5.0.4 as well as in a local build of r82399.
Comment 3 Raja Ravi Varma 2011-04-09 09:57:39 PDT
(In reply to comment #2)
> Works for me in Safari 5.0.4 as well as in a local build of r82399.

I don't know about the safari, except the Safari web browser which uses the apple webkit. 

As far as I know, the above shown web page works as expected, in Firefox and it does not works in my mobile Nokia E63. If you need much proof I am ready send the screen shots and  the application too.
Comment 4 Benjamin Poulain 2011-04-11 05:32:35 PDT
I wish I could fix that but we are missing APIs.

*** This bug has been marked as a duplicate of bug 48313 ***
Comment 5 Raja Ravi Varma 2011-04-13 06:36:38 PDT
In that bug, they have said that iwas working fine with GMaps Javascript version 2.0 but it is not even working with version 2.0. The setZoom value is not working.
Comment 6 Eugene Nikolsky 2012-02-15 03:51:20 PST
I can confirm this bug. I use a slightly modified simple HTML file with Google Maps Javascript API v3 (based on http://code.google.com/apis/maps/documentation/javascript/examples/map-simple.html). The map is unusable on device (I tested on N97) because zoom resets to 0 every time when you try to change it, this is confirmed by the logs. I added a callback so when the user clicks on the map, zoom should be set to 8, it does get set, and then immediately resets to 0 again.

Everything works properly on Qt Simulator 4.7.3, and, what's interesting, on N97 with Qt Webkit 4.6.3, but not with Qt 4.7.3. Therefore, it's a regression.

I've also checked the Bug 48313, and it is different, it has to do with the ability of dragging the map (and can be fixed with this workaround: http://developer.qt.nokia.com/forums/viewthread/1643/P15/#36423). I don't think this bug is a duplicate of that one.

Just in case, here are user-agents I've got while testing:
Qt Simulator: "Mozilla/5.0 (Unknown; U; Windows NT 6.1; en-US) AppleWebKit/533.3 (KHTML, like Gecko) Qt/4.7.4 Safari/533.3"
N97 Qt 4.7.3: "Mozilla/5.0 (SymbianOS/9.4; U;  Series60/5.0; en-US) AppleWebKit/533.3 (KHTML, like Gecko) Qt/4.7.3 Mobile Safari/533.3"
N97 Qt 4.6.3: "Mozilla/5.0 (SymbianOS/9.4; U; Series60/5.0; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Qt/4.6.3 Mobile Safari/532.4"

I'll also attach an archive with a few screenshots, two sis packages, and the sample project.
Comment 7 Eugene Nikolsky 2012-02-15 03:53:02 PST
Created attachment 127156 [details]
Screenshots, sis packages, and the sample project.