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:
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.
QPoint coordinateToWorldReferencePosition(const QGeoCoordinate &coordinate ) const;
QGeoCoordinate worldReferencePositionToCoordinate(const QPoint &pixel) const;
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?