diff options
Diffstat (limited to 'examples/location/mapviewer/mapviewer.qml')
-rw-r--r-- | examples/location/mapviewer/mapviewer.qml | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/examples/location/mapviewer/mapviewer.qml b/examples/location/mapviewer/mapviewer.qml index 1472b77f..64de94be 100644 --- a/examples/location/mapviewer/mapviewer.qml +++ b/examples/location/mapviewer/mapviewer.qml @@ -188,7 +188,6 @@ ApplicationWindow { map.routeModel.update(); // center the map on the start coord map.center = startCoordinate; - stackView.pop(page); //! [routerequest1] } @@ -222,6 +221,14 @@ ApplicationWindow { stackView.pop(page) } + function showRouteListPage() { + stackView.push({ item: Qt.resolvedUrl("RouteList.qml") , + properties: { + "routeModel" : map.routeModel + }}) + stackView.currentItem.closeForm.connect(closeForm) + } + function geocodeMessage(){ var street, district, city, county, state, countryCode, country, postalCode, latitude, longitude, text latitude = Math.round(map.geocodeModel.get(0).coordinate.latitude * 10000) / 10000 @@ -315,6 +322,9 @@ ApplicationWindow { onShowPointMenu: {\ itemPopupMenu.show("Point",coordinate);\ }\ + onShowRouteList: {\ + showRouteListPage(); + }\ }',page) map.plugin = plugin; map.zoomLevel = (map.maximumZoomLevel - map.minimumZoomLevel)/2 @@ -457,13 +467,13 @@ ApplicationWindow { onItemClicked: { stackView.pop(page) switch (item) { - case "infoRoute": - //ignore till next commit + case "showRouteInfo": + showRouteListPage() break; case "deleteRoute": - map.clearRoute() + map.routeModel.reset(); break; - case "infoPoint": + case "showPointInfo": map.showGeocodeInfo() break; case "deletePoint": |