Results 1 to 4 of 4

Thread: Show user current location on google map in android

  1. #1
    Join Date
    Sep 2014
    Posts
    9
    Qt products
    Qt5
    Platforms
    MacOS X Android

    Default Show user current location on google map in android

    In my application i want to find user current location (coordinate) and show that on google map. I've tried to show user location on google map with QWebView,it works only on windows platform, but My application will run on android.How can i show user location on map on android platform?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Show user current location on google map in android

    You have not described how you have tried to do it. You have not shown even a snippet of the code that "works only on Windows." You have not described what it does differently on Android. You have not told what versions of components are involved. You have not described what you have done to diagnose the problem. How would you like us to help?

  3. #3
    Join Date
    Sep 2014
    Posts
    9
    Qt products
    Qt5
    Platforms
    MacOS X Android

    Default Re: Show user current location on google map in android

    I want to implement an android application with qt 5.3 that can find user current location and show the location on a map. I've finded user location with this codes:

    source = QGeoPositionInfoSource::createDefaultSource(this);
    if (source){
    qDebug() << "sourceName():" << source->sourceName();

    source->setPreferredPositioningMethods(QGeoPositionInfoSo urce::AllPositioningMethods);

    connect(source, SIGNAL(positionUpdated(QGeoPositionInfo)),
    this, SLOT(positionUpdated(QGeoPositionInfo)));

    source->setUpdateInterval(10000);
    info = source->lastKnownPosition();
    coordinate = info.coordinate();
    latitude = QString::number(coordinate.latitude());
    longitude = QString::number(coordinate.longitude());
    }

    Now i want to use QMapControl (http://www.medieninf.de/qmapcontrol/) or something like that to show location on a map widget. I know that QWebView is not supported in android(http://qt-project.org/forums/viewthread/43113). I'm using qt5.3 . Is it posible to use QMapControl in qt5.3 ? if yes, how?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Show user current location on google map in android

    The class you mention is not part of Qt5. However it shouldn't be very hard to implement something similar.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. My Qt android apps on google-play !
    By nik02 in forum Qt-based Software
    Replies: 3
    Last Post: 13th January 2016, 12:29
  2. Find and Send User Current Location like Viber with QT
    By hasti in forum Qt for Embedded and Mobile
    Replies: 5
    Last Post: 28th September 2014, 08:28
  3. Qt 5.2 or 5.3RC android app development and Google maps usage question
    By DonRico in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 16th May 2014, 10:41
  4. QML Qt 5 Location show a Route
    By Gihu in forum Qt Quick
    Replies: 2
    Last Post: 31st August 2012, 10:03
  5. How to find the location of the user?
    By nikhilqt in forum Qt Programming
    Replies: 7
    Last Post: 14th December 2010, 19:22

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.