Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.9.1
-
None
-
Windows 10, Desktop
Description
There is a problem with the QML GeoRectangle class.
Geocodemodel "get(0).boundingBox" does not provide any or incorrect data, although they are available at the osm response.
Response by osm (contains randomly selected address data) :
{"place_id":"79882930","licence":"Data © OpenStreetMap contributors, ODbL 1.0. http:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"45820736","lat":"53.6687387","lon":"10.1482188","display_name":"39, Ohlendorffs Tannen, Volksdorf, Wandsbek, Hamburg, 22359, Deutschland","address":{"house_number":"39","road":"Ohlendorffs Tannen","suburb":"Volksdorf","city_district":"Wandsbek","state":"Hamburg","postcode":"22359","country":"Deutschland","country_code":"de"},"boundingbox":["53.6686998","53.6687776","10.1481343","10.1483033"]}
Example code:
GeocodeModel {
plugin: osmPlugin
onStatusChanged:
{
switch(status)
{
case GeocodeModel.Ready:
console.log(get(0).boundingBox.isValid);
console.log(get(0).boundingBox.topLeft.latitude);
console.log(get(0).boundingBox);
break;
}
}
}
Output;
qml: false
qml: NaN
qml: QGeoRectangle({nan, nan}, {nan, nan})
should be
QGeoRectangle({53.6686998, 10.1481343}, {53.6687776, 10.1483033})
in addition
OSM provides the house number as shown above (HOUSE_NUMBER), but it is not processed by Qt directly. If i want to display the house number individually, i have to use the property "Address::text" to read the whole text and separate the house number from it, since the house numbers are at a different position in the text (depending on the building type), it makes the whole thing very cumbersome.
The property string Address::houseNumber would be very nice.
Sorry for the previous german post. the german pages layout has confused me
Attachments
Issue Links
- relates to
-
QTBUG-62624 Reverse Geocoding with OpenStreetMap should add house_number to street
- Closed