Hi there,
I am trying to implement a ServiceLocator using QML (AppStudio). It works great in a general sense as you can see below:
However I miss the suggestion property I used to have when I worked with the javascript API. I was having a look at the QML API but I am not able to see any word about suggestions.
Any clue?
Thanks,
Rafael Fernandez
Solved! Go to Solution.
This is being implemented in the next major release "Quartz"
SuggestListModel QML Type | ArcGISQtQML Quartz
Until then, the only option you have is to make a NetworkRequest to get the suggestions from the World geocoding service.
property url serverURL: "https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/suggest?f=json&text=3&maxSuggest..."
NetworkRequest { id: networkRequest
url: serverURL
responseType: "json"
onReadyStateChanged: { if ( readyState === NetworkRequest.DONE ) { jsonText.text = JSON.stringify(response, undefined, 2); } else { jsonText.text = readyState; } }
} I haven't tried yet but you can make a new request onTextChanged signal
This is being implemented in the next major release "Quartz"
SuggestListModel QML Type | ArcGISQtQML Quartz
Until then, the only option you have is to make a NetworkRequest to get the suggestions from the World geocoding service.
property url serverURL: "https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/suggest?f=json&text=3&maxSuggest..."
NetworkRequest { id: networkRequest
url: serverURL
responseType: "json"
onReadyStateChanged: { if ( readyState === NetworkRequest.DONE ) { jsonText.text = JSON.stringify(response, undefined, 2); } else { jsonText.text = readyState; } }
} I haven't tried yet but you can make a new request onTextChanged signal