diff options
Diffstat (limited to 'examples/declarative/mapviewer/mapviewer.qml')
-rw-r--r-- | examples/declarative/mapviewer/mapviewer.qml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/declarative/mapviewer/mapviewer.qml b/examples/declarative/mapviewer/mapviewer.qml index fb276340..30fb2e28 100644 --- a/examples/declarative/mapviewer/mapviewer.qml +++ b/examples/declarative/mapviewer/mapviewer.qml @@ -401,7 +401,7 @@ FocusScope { z: mainMenu.z + 1 Component.onCompleted: { - var obj = [["Street", "Brandl St"],["District",""],["City", "Eight Mile Plains"], ["County", ""],["State", ""],["Country code",""],["Country","Australia"]] + var obj = [["Street", "Brandl St"],["District",""],["City", "Eight Mile Plains"], ["County", ""],["State", ""],["Country code",""],["Country","Australia"], ["Post code", ""]] setModel(obj) } @@ -419,6 +419,7 @@ FocusScope { geocodeAddress.state = dialogModel.get(4).inputText geocodeAddress.countryCode = dialogModel.get(5).inputText geocodeAddress.country = dialogModel.get(6).inputText + geocodeAddress.postcode = dialogModel.get(7).inputText map.geocodeModel.clear() map.geocodeModel.query = geocodeAddress map.geocodeModel.update(); @@ -553,7 +554,7 @@ FocusScope { } function geocodeMessage(){ - var street, district, city, county, state, countryCode, country, latitude, longitude, text + var street, district, city, county, state, countryCode, country, postcode, latitude, longitude, text latitude = map.geocodeModel.get(0).coordinate.latitude longitude = map.geocodeModel.get(0).coordinate.longitude street = map.geocodeModel.get(0).address.street @@ -563,6 +564,7 @@ FocusScope { state = map.geocodeModel.get(0).address.state countryCode = map.geocodeModel.get(0).address.countryCode country = map.geocodeModel.get(0).address.country + postcode = map.geocodeModel.get(0).address.postcode text = "<b>Latitude:</b> " + latitude + "<br/>" text +="<b>Longitude:</b> " + longitude + "<br/>" + "<br/>" @@ -573,6 +575,7 @@ FocusScope { if (state) text +="<b>State: </b>"+ state + " <br/>" if (countryCode) text +="<b>Country code: </b>"+ countryCode + " <br/>" if (country) text +="<b>Country: </b>"+ country + " <br/>" + if (postcode) text +="<b>Postcode: </b>"+ postcode + " <br/>" return text } |