summaryrefslogtreecommitdiffstats
path: root/examples/declarative/webview/content/Mapping/Map.qml
blob: 2e98940ee9c031cb4f7351ab3d908cdb5e8471e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import Qt 4.6

Item {
    id: page
    property real latitude: -34.397
    property real longitude: 150.644
    property string address: ""
    WebView {
        id: map
        anchors.fill: parent
        url: "map.html"
        javaScriptWindowObjects: QtObject {
            WebView.windowObjectName: "qml"
            property real lat: page.latitude
            property real lng: page.longitude
            property string address: page.address
            onAddressChanged: {map.evaluateJavaScript("goToAddress()")}
        }
    }
}