Registered Member
|
Hi!
Since I use Marble to build my GUI application, I've decied to make my own class containing MarbleWidget (code below). I've also create function setRoute(qreal,qreal,qreal,qreal) that creates a route between two points (it is executed after pressing the button, hence public slot functions). When I use example Basic Routing from C++ Marble tutorial, everythhing is fine. But when using my function to create a route, it shows wrong coordinates on the map. (not that which I give to function as arguments). I don't know if this some kind of bug if I'm doing sth wrong? mapWidget.h
cpp file
|
KDE Developer
|
Dennis Nienhüser (aka Earthwings) is the expert on this topic in our team. Currently he's out of town for a day or two, so it might take a few hours until you get a qualified answer
Personally I don't spot an obvious bug in your code but that says nothing since I'm not very much familiar with the routing topic - longitude and latitude seem to be in the correct order (at least if you initially "feed" them correctly). That being said I'd be surprised if the faulty behavior was due to a bug in Marble since this kind of functionality gets used for all our routing features and is frequently used. Best Regards, Torsten |
Registered Member
|
Ok, so now I wait Just to specify: it looks like both points are shifted on the same vector since relative distance and position beetween them looks fine.
Sincerely, jpati |
KDE Developer
|
Maybe you can attach a screenshot to give us a better idea of what is wrong?
|
Registered Member
|
Here you are: http://i48.tinypic.com/f0bzau.png Function should calculate route beetween ends of red line but it calculates beetween points A and B.
|
Registered Member
|
Ok, I've just found where the problem exists! I copied coordinates from Marble application that are given in UTM (or DMS, I'm not sure) format but GeoDataCoordinates function accepts Decimal format so my points were wrong indeed. Is it possible to use UTM (DMS?) coordinates in my routing or I have to convert them to Decimal format?
|
KDE Developer
|
Possibly DMS, which is Marble's default coordinate representation to the user. Note that you can change it in Marble's settings to Decimal, which many people prefer. The "copy coordinates" action follows that setting.
There's GeoDataCoordinates fromString() method which can be used to parse DMS coordinates, but it's primarily meant to parse user input that does not originate from a map directly (e.g. copied as a string from some website). If you have a chance to get the input in Decimal notation, I'd go for that. |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell