×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    103

    Drawing Map Route

    I have a QGeoMapRouteObject resulted from navigation.

    On simulator it looks like this when I draw it:


    But on phone it looks like a river of ink spilled all over the map:


    What is the problem on the phone? Did I miss something?

    Here is some sample code:
    Code:
    void MapWindow::routeCalculated(QGeoRouteReply *reply)
    {
        qDebug()<<"Route is calculated";
        // A route request can ask for several alternative routes ...
        if (reply->routes().size() != 0) {
            qDebug()<<"There is routes";
    
            // ... but by default it will only get a single route
            QGeoRoute route = reply->routes().at(0);
    
            //... now we have to make use of the route ...
            if(!routeObject) {
                routeObject = new QGeoMapRouteObject;
            }
    
            routeObject->setRoute(route);
            routeObject->setPen(QPen(Qt::blue, 4.0));
            routeObject->setDetailLevel(20); // make sure detail level has default value
    
            if(!m_mapWidget->mapObjects().contains(routeObject))
                m_mapWidget->addMapObject(routeObject);
    
    
            m_mapWidget->fitInViewport(routeObject->boundingBox());
    
            m_mapWidget->update();
    
        }
    
        reply->deleteLater();
    }

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,142

    Re: Drawing Map Route

    have you checked the wiki example for teh routing: http://www.developer.nokia.com/Commu..._Maps_Examples AFAIK it draws just fine.

  3. #3
    Registered User
    Join Date
    Jul 2008
    Posts
    103

    Re: Drawing Map Route

    The map code is based on MapInteraction example and routing based on code example in the class documentation. This happens to any route I draw on map (also when I use QGeoMapPolylineObject), so I suppose there is a global setting or a error on the map widget class. Any idea what it could be and why on simulator it works?

    I just tested on N97, I don't have any other device to test it yet.

  4. #4
    Registered User
    Join Date
    Jul 2008
    Posts
    103

    Re: Drawing Map Route

    I also tested on Symbian^3 (N8) and it looks the same. Any idea why it looks this awful ?

  5. #5
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,142

    Re: Drawing Map Route

    I never seen it to look like that, though I only used the examples I made to wiki.. Anyway, you could always make a bug report, also attach your code to the bug report, so it would be easier to re-produce.

  6. #6
    Registered User
    Join Date
    Jul 2008
    Posts
    103

    Re: Drawing Map Route

    It seems it's a general Qt problem. Look how the simple rooting example looks like:


    I'm using the latest Qt SDK (done all the updates), compiling for Qt 4.7.3 with Qt Mobility 1.1.3. Should I fill in a bug report ?

  7. #7
    Super Contributor
    Join Date
    Jul 2008
    Posts
    2,020

    Re: Drawing Map Route

    Hit JIRA with a bug report!

    If its not a bug, they will come cursing at you very soon Jokes aside, if it is YOUR bug, the folks dont tend to be too angry - it happened to me a few times in the past as well.

    Just make it a thorough bug report...
    The lines above are the best I have to offer.If anyone of you is of more advanced knowledge, I ask for your patience and understanding! - unknown arab poet
    http://www.tamoggemon.com - Symbian blog - Windows Phone blog
    My other blogs:
    webOS blog iPhone blog BlackBerry blog Samsung bada blog Android blog

  8. #8

Similar Threads

  1. How to draw Google Map Route path in J2me
    By som_rout in forum Mobile Java General
    Replies: 2
    Last Post: 2012-01-09, 14:24
  2. Route in Google Static MAP API
    By eling0167 in forum Geolocation and Navigation
    Replies: 6
    Last Post: 2011-11-17, 08:35
  3. http connection to retrieve a map with a route
    By johnf1_coolguy in forum Mobile Java Networking & Messaging & Security
    Replies: 4
    Last Post: 2009-07-09, 11:59
  4. how to get geocoding data, map, navigation route, in jsr293?
    By renige in forum Geolocation and Navigation
    Replies: 1
    Last Post: 2009-02-24, 11:44
  5. Drawing a MAP, Vector Graphics
    By JWtheCoolOne in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2005-01-02, 22:20

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •