Qt & google maps for iOS/Android
-
wrote on 27 Nov 2013, 08:49 last edited by
Hello,
We are a group of students working on a cross platform mobile app, and we are currently looking for a framework to do so.
We would like to know if Qt allows us to develop an app which includes the google maps api, and that would be working for both android and iOS, with the possibility to add markers on the map with On-Touch events and to get the user location (GPS Coordinates) (The features which are avaible in the google maps api)Thanks in advance !
-
We have tested to integrate native Google Map SDK on Android. Basic feature is ok but there has few problems. Since Qt do not provide mechanism to embed Android view component into QML. It has to draw on top of QML. Therefore, we can not draw anything on top of the Google map by QML. Moreover, if we need to move the view component with effects like move-in , the animation may not be in-sync with QML.
Still finding solution for those problems.
-
wrote on 18 Dec 2013, 10:28 last edited by
Hello guys,
Any result with this? -
you may want to watch/vote this "BUGREPORT":https://bugreports.qt-project.org/browse/QTBUG-35648.
-
Voted.
By the way , for using Google Maps on Qt in Android , there has another issue. The Google Maps native library is bundled with the Google Play Services SDK. The SDK has its own layout and resource file. It can not be existed in the form of a single jar file.
When we are doing Android development, it have to add the project reference into Eclipse so that it will be build together with current project.
Currently I can not find any method with Qt Creator to add the library reference during build. Instead, I have press "run" on Qt Creator to copy all the files into the build directory. Then I launch Eclipse , add the project reference , then build it.
It is very troublesome.
-
wrote on 2 Feb 2014, 12:10 last edited by
Still hoping for an elegant solution to this, any further news please?
-
wrote on 11 Feb 2014, 11:17 last edited by
I was wondering as there is a Google map app in every android device nowadays, can't I just send coordinates from my app to the Google map app and lunch the Google map app with these coordinates?
-
wrote on 30 Apr 2014, 17:13 last edited by
bq. I was wondering as there is a Google map app in every android device nowadays, can’t I just send coordinates from my app to the Google map app and lunch the Google map app with these coordinates?
You have two ways :
1- Use QDesktopServices to open a google map url :
@
QString link = "http://maps.google.com/maps?&daddr="+location;
QDesktopServices::openUrl(link);
@
2- Use AndroidExtra module and launch a Google Map Intent :
@
String uri = "http://maps.google.com/maps?&daddr="+location;
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
if (intent.resolveActivity(m_context.getPackageManager()) != null) {
m_context.startActivity(intent);
}
@ -
wrote on 30 Apr 2014, 18:01 last edited by
Thanks for your reply but I'm looking for a way to open it without leaving the app.
-
wrote on 26 Jun 2019, 02:13 last edited by
Bump. 5 years later, still looking for a solution.
Learning Kotlin is one way, but it would be really nice to integrate Maps and the Qt API.
-
Maybe this QtLocation plugin might be of use.