Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.9
- import QtQuick.Controls 2.2
- import QtQuick.Window 2.0
- import QtLocation 5.6
- import QtPositioning 5.6
- ApplicationWindow {
- id: app_window
- visible: true
- width: 1024
- height: 800
- title: qsTr("Navigation")
- Plugin {
- id: mapPlugin
- name: "osm"
- }
- Rectangle {
- id: mapRectangleID
- width: 500
- height: 500
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- Map {
- id: map
- anchors.fill: parent
- plugin: mapPlugin
- center {
- latitude: 59.91//länge
- longitude: 10.75//breite
- }
- zoomLevel: 14
- //******************************START POINT******************************//
- MapCircle {
- id: startPointCircle
- center {
- latitude: 59.91
- longitude: 10.75
- }
- radius: 100000.0
- color: 'green'
- border.width: 3
- }
- //******************************FINISH POINT******************************//
- MapCircle {
- id: endPointCircle
- center {
- latitude: 51.20
- longitude: 12.22
- }
- radius: 100000.0
- color: 'red'
- border.width: 3
- }
- }// Map
- } //Rectangle
- //******************************START POINT INPUT FIELD BREITE******************************//
- Rectangle{
- id:_ifStartingPoint
- width: 100
- height: 20
- border.color: 'gray'
- border.width: 2
- x: 900
- y: 100
- anchors.left: app_window.right
- TextInput {
- id: txtPlainStartPointLatitude
- anchors.fill: parent
- anchors.margins: 4
- }
- }
- //******************************END POINT INPUT FIELD LAENGE******************************//
- Rectangle{
- id:_ifEndPoint
- width: 100
- height: 20
- border.color: 'gray'
- border.width: 2
- x: 900
- y: 150
- anchors.left: app_window.right
- TextInput {
- id: txtPlainStartPointLongitude
- anchors.fill: parent
- anchors.margins: 4
- }
- }
- Button {
- text: "Zeige den weg"
- x: 900;
- y: 200
- onClicked: {
- // map.Longitude = txtPlainStartPointLatitude.Text
- center: QtPositioning.coordinate(latitude= txtPlainStartPointLatitude.Text, longitude= txtPlainStartPointLatitude.Text)
- }
- }
- PositionSource {
- nmeaSource: "socket://127.0.0.1:12345"
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement