Solved QtWebkit 4.8 : Google map : Polyline not visible
-
I am using Qt 4.8 and trying to view a html page with javascript. I am using google maps to use the direction service.
OS : Ubuntu 12.04var directionsService = new google.maps.DirectionsService(); var directionsDisplay = new google.maps.DirectionsRenderer(); function route(origin,dest){var request = {origin: origin, destination: dest,travelMode: google.maps.DirectionsTravelMode.DRIVING}; directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK){ directionsDisplay.setDirections(response); } }); }
I am relatively new to javascript and html, so kindly bear with my mistakes.
While viewing this in Chrome and Firefox, the polyline is visible. But in webkit the polyline is not coming up.It tried a simple html code to draw polyline. Same thing happened. It works in firefox and chrome, but not in webkit.
Can someone please help me with this issue ?
-
Hi,
Consider updating to a more recent version of Qt and if possible also of Ubuntu.
Both Ubuntu 12.04 and Qt 4.8 have reached EOL.
-
@SGaist I am already having a project running on Qt 4.8 and i want to integrate this with that project. Does polyline use any particular feature of webkit ?
-
@name_qt said in QtWebkit 4.8 : Google map : Polyline not visible:
Does polyline use any particular feature of webkit ?
Highly possible. QtWebkit has been upgraded in Qt5. Also Google maps only runs in "legacy" mode under this old webkit version as in Qt4.
But also note, that QtWebkit isn't part of release packages since Qt 5.6 and has been replaced by QtWebEngine (Chromium backend). You will have to build QtWebkit from source yourself for Qt 5.6+ -
To add to @raven-worx, there's @Konstantin-Tokarev webkit reboot project for recent versions of Qt.
-
@name_qt If for some reason you absolutely must stay with Qt 4, use QtWebKit 2.3.x instead of built-in version
-
This post is deleted! -
This post is deleted! -
@Konstantin-Tokarev I was using QtWebkit 2.2.0. Using Qt 2.3.4 solved the issue.