PDA

View Full Version : Google Earth/Maps and QWebView API



TheIndependentAquarius
28th June 2012, 10:20
I have successfully managed to run Google maps on Qt widget through QWebView, previously.
But, now I wish to know the following:


Does Qt have an API replacement for Google map's Javascript API? Like Qt has its dedicated API for Nokia's OVI maps, does it have something similar for Google Maps/Earth which will totally get the Javascript out of picture?
Google Earth is said to be in support of Qt 3, does QWebView work with Qt 3? Are they both compatible?

wysota
28th June 2012, 10:25
Does Qt have an API replacement for Google map's Javascript API? Like Qt has its dedicated API for Nokia's OVI maps, does it have something similar for Google Maps/Earth which will totally get the Javascript out of picture?
http://www.ics.com/technologies/qt_google_apis


Google Earth is said to be in support of Qt 3, does QWebView work with Qt 3? Are they both compatible?
No, they are not. Google Earth does not use Google maps API, at least not the javascript one.

TheIndependentAquarius
28th June 2012, 10:56
http://www.ics.com/technologies/qt_google_apis
That was an utterly helpful link. Thankful for that.

But, when I clicked on "Qt Google Places" download link there, I couldn't find any Qt API.
Perhaps because I don't have the key yet, but is there a way to peek in the API without the key? I wish to see how it looks.

Ok, I found this: http://code.google.com/p/qt-google-places/source/browse/placesdatamanager.h


No, they are not. Google Earth does not use Google maps API, at least not the javascript one.
Alright, I'll read more on Google Earth API, but I saw your post here: http://www.qtcentre.org/threads/27514-Google-Earth-Plugin-in-QWebKit?p=130397#post130397
You said: "It could be a clash between Qt3 used by GoogleEarth and Qt4 used by QtWebKit. Check the plugin dependencies though and make sure WebKit can find it."

What were you referring to here?

wysota
28th June 2012, 12:42
What were you referring to here?
I was speaking about the fact that Google Earth uses Qt3 and QtWebKit uses Qt4 and there are similar symbol names in both (e.g. QApplication) which could result in Qt4-based code trying to access some calls from Qt4 but really reaching into Qt3 code and crashing because of ending up in bogus binary data. One would have to rebuild Qt4 and QtWebKit using a custom namespace (or similar approach) to avoid symbol clashes. Then it might work.

TheIndependentAquarius
30th June 2012, 09:08
Thanks for the clarification.


I was speaking about the fact that Google Earth uses Qt3
Yesterday I noticed that Google Earth is supported on openSUSE 12.1 which uses Qt 4, but you say that Google Earth uses Qt 3.
Am I missing a point?
Could you give me a link please which shows the Qt version (supported on Linux) used by Google Earth.
I searched hard but couldn't find it. Most resultant sites say that it uses Qt but they don't mention the version.

wysota
30th June 2012, 10:08
Yesterday I noticed that Google Earth is supported on openSUSE 12.1 which uses Qt 4, but you say that Google Earth uses Qt 3.
Am I missing a point?

Qt3 and Qt4 can co-exist (in the meaning that there are files for both installed on the same system). I was speaking about linking (using) both in the same app.