QPoint ApplicationUI::worldToPixel(QObject* mapObject, double latitude, double longitude) const { MapView* mapview = qobject_cast<MapView*>(mapObject); const Point worldCoordinates = Point(latitude, longitude); return mapview->worldToWindow(worldCoordinates); }
QVariantList ApplicationUI::worldToPixelInvokable(QObject* mapObject, double latitude, double longitude) const { MapView* mapview = qobject_cast<MapView*>(mapObject); const Point worldCoordinates = Point(latitude, longitude); const QPoint pixels = mapview->worldToWindow(worldCoordinates); return QVariantList() << pixels.x() << pixels.y(); }