Qt & google maps for iOS/Android



  • 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 !


  • Qt Champions 2016

    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.



  • Hello guys,
    Any result with this?


  • Moderators

    you may want to watch/vote this "BUGREPORT":https://bugreports.qt-project.org/browse/QTBUG-35648.


  • Qt Champions 2016

    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.



  • Still hoping for an elegant solution to this, any further news please?



  • 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?



  • 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);
    }
    @



  • Thanks for your reply but I'm looking for a way to open it without leaving the app.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.