summaryrefslogtreecommitdiffstats
path: root/examples/declarative/webview/content/Mapping/Map.qml
blob: aae6b5d16a10b173e164a8616aa66d7f4ab00139 (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()")}
        }
    }
}