Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User PcNy's Avatar
    Join Date
    Apr 2011
    Posts
    42
    Hello, I'm currently trying to develop an application that displays map.
    I designed the interface with Designer and there was a GraphicsView in it.
    It can be compiled and run but simulator shows nothing and exited with code -1073741819

    Here is the code

    Code:
    mappingManager = 0;
        routingManager = 0;
        searchManager = 0;
        QGeoServiceProvider serviceProvider("nokia");
        if (serviceProvider.error() == QGeoServiceProvider::NoError) {
            mappingManager = serviceProvider.mappingManager();
            routingManager = serviceProvider.routingManager();
            searchManager = serviceProvider.searchManager();
        }
        QGraphicsGeoMap *map = new QGraphicsGeoMap(mappingManager);
    
        scene = new QGraphicsScene;
        ui->gvMap->setScene(scene);
        ui->gvMap->scene()->addItem(map);
    ui->gvMap is GraphicsView widget that I designed with designer in mainwindow.ui.
    The code above is placed in mainwindow.cpp

    When I comment this line out, the app can run and no exited with such code but the map will not display.
    Code:
    ui->gvMap->scene()->addItem(map);
    Please help me

  2. #2
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,673
    you could maybe chekc what do you do differently with working examples: http://wiki.forum.nokia.com/index.php/Qt_Maps_Examples

  3. #3
    Registered User PcNy's Avatar
    Join Date
    Apr 2011
    Posts
    42
    Quote Originally Posted by symbianyucca View Post
    you could maybe chekc what do you do differently with working examples: http://wiki.forum.nokia.com/index.php/Qt_Maps_Examples
    Yes, I've looked at HelloMap example. The difference is I use GraphicsView that I created in the Designer but the example uses GraphicsView object created by coding.
    I'm not sure whether this might be the problem?

  4. #4
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,673
    did you try wheter the example works and shows the map in your environment also ? as well as did you check that you are doing the maps APIs construction after the connection has been successfully established ?

  5. #5
    Registered User PcNy's Avatar
    Join Date
    Apr 2011
    Posts
    42
    Yes, I tried to run HelloMap example and it could run on my environment.
    Here is my code attached.
    http://www.mediafire.com/?z6fc1a3a0czsyn6

  6. #6
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,673
    I'm sorry but I don't really have time on going through other people projects, thus please see how the Helloworld maps is initialized, and see whether you do something differently.

  7. #7
    Registered User PcNy's Avatar
    Join Date
    Apr 2011
    Posts
    42
    I just figured this out. After I changed QGeoServiceProvider object to a pointer, it could work.
    But now the problem is about displaying.
    The map does not seem to fit in my GraphicsView
    I tried to use

    map-resize(view->size());

    but no luck, the map is still much smaller than the GraphicsView.
    Is this because I use grid layout so the actual map size is much smaller than I see in designer?

  8. #8
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,673
    I would not havr any idea on that, the map was sizing it self as wanted with those examples I made in wiki.

Similar Threads

  1. how to display a gps location on a map - wrt
    By gomcoite in forum Symbian Web Runtime
    Replies: 3
    Last Post: 2010-04-27, 17:01
  2. How to Display Gauge Control on map?
    By yama.raol in forum Mobile Java General
    Replies: 2
    Last Post: 2010-04-23, 09:12
  3. What techniques are available to display a map on the phone?
    By KevinBoyd in forum Mobile Java General
    Replies: 0
    Last Post: 2009-09-23, 07:21
  4. Replies: 2
    Last Post: 2009-02-13, 03:19
  5. Label Not found error on trying to display a simple TITLE.
    By Nokia_Archive in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2002-06-03, 02:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved