MapRouteThe MapRoute element displays a Route on a Map. More... Inherits Item This type was introduced in Qt Location 5.0. Properties
Detailed DescriptionThe MapRoute element displays a Route obtained through a RouteModel or other means, on the Map as a Polyline following the path of the Route. MapRoute is really a MapPolyline, but with the path specified using the route property instead of directly in Coordinates. By default, the route is displayed as a 1-pixel thick black line. This can be changed using the line.width and line.color properties. PerformanceFor notes about the performance on MapRoute, refer to the documentation for MapPolyline. Example UsageHere is how to draw a route on a map: import QtQuick 2.0 import QtLocation 5.0 Map { RouteModel { id: routeModel } MapItemView { model: routeModel delegate: routeDelegate } Component { id: routeDelegate MapRoute { route: routeData line.color: "blue" line.width: 5 smooth: true opacity: 0.8 } } } Property DocumentationThese properties hold the width and color used to draw the line. The width is in pixels and is independent of the zoom level of the map. The default values correspond to a black border with a width of 1 pixel. For no line, use a width of 0 or a transparent color. Holds the route to be drawn which can be used to represents one geographical route. |