Discussion Board

Results 1 to 2 of 2

Hybrid View

  1. #1
    Registered User
    Join Date
    Dec 2011

    QGeoMapObject's drawn in wrong place when using custom tile map projection

    I'm trying to implement a custom tile based map plugin using Qt Mobility MAP API's.
    I already have a custom tile map plugin that is based on QGeoTiledMapData, and it seems to work nicely when using Mercator map projection.

    When I try to implement a different map projection there's some mysterious problem. I re-implemented these functions in my QGeoTiledMapData-derived class like the documentation suggests:
        QPoint coordinateToWorldReferencePosition(const QGeoCoordinate &coordinate ) const;
        QGeoCoordinate worldReferencePositionToCoordinate(const QPoint &pixel) const;
    Panning the map to correct location seems to work nicely. But when I try to add QGeoMapObject-based objects into the map, they are drawn in places where the default Mercator projection points instead of using my custom projection.

    I have tested and double-checked my algorithms and they definitely work OK. So IMHO the custom map plugin should just work.

    I tried with an example program, and it seems that the customized coordinateToWorldReferencePosition() -function is not even called for my QGeoMapObject object's coordinates (QCoordinate). If I understand correctly that should be done for each of the objects in order to determine where the objects should be placed on the map.

    Any ideas where this goes wrong?
    Is there need to implement/customize also some other functions in my custom map plugin in order for the objects to be placed correctly?
    Or is there actually a bug in Qt Mobility regarding custom map projections?

  2. #2
    Registered User
    Join Date
    Dec 2011

    Re: QGeoMapObject's drawn in wrong place when using custom tile map projection

    Looks like that this is a bug in Qt Mobility:

Similar Threads

  1. Image not drawn on custom listbox
    By swasaa in forum Symbian User Interface
    Replies: 4
    Last Post: 2010-09-20, 11:16
  2. Projection matrices in m3g.Camera
    By mukundan in forum Mobile Java General
    Replies: 0
    Last Post: 2010-06-03, 12:27
  3. [moved] devices.xml in wrong place when installing to D:
    By hselber in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2009-09-07, 16:59
  4. OpenGl: Slow performance with orthogonal projection
    By LyhjeHylje in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2009-08-17, 14:57
  5. How to implement projection for jsr184 animation?
    By zappu in forum Mobile Java Games
    Replies: 1
    Last Post: 2008-03-23, 18:33

Posting Permissions

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