POST
|
I am very Grateful Nakul Manocha. It's working perfect. One question please "On performing search it's find all addresses (E.g When I search 5 G 82 ,it's highlight 5 G 82,5 G 8/2 and 5 J 82) but I need when i write specific address it's only find that particular address. It would be greatly appreciated. Cheers, "Tasadduq Hussain"
... View more
04-06-2017
09:42 PM
|
0
|
2
|
1592
|
POST
|
I am using my owned prepared locator Geocode service (http://maps.dhalahore.org/ArcGIS/rest/services/DHAMAP/AddressLocator/GeocodeServer) in Geocode online (arcgis-appstudio-samples-master). Working perfect on Reverse Geocoding but giving Error (Unable to complete operation. No Address Found) when i search any address in search box. Here code: import QtQuick 2.3 import QtQuick.Controls 1.2 import QtQuick.Dialogs 1.2 import QtPositioning 5.3 import ArcGIS.AppFramework 1.0 import ArcGIS.AppFramework.Controls 1.0 import ArcGIS.AppFramework.Runtime 1.0 import ArcGIS.AppFramework.Runtime.Controls 1.0 import ArcGIS.AppFramework.Runtime 1.0 App { id: app width: 800 height: 532 property double scaleFactor: AppFramework.displayScaleFactor property string errorMsg Map { id: mainMap anchors.fill: parent extent: usExtent focus: true ArcGISTiledMapServiceLayer { url: "http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" } SimpleMarkerSymbol { id: simpleMarkerSymbolLocation color: "red" style: Enums.SimpleMarkerSymbolStyleCross size: 10 } SimpleMarkerSymbol { id: simpleMarkerSymbolReverseLocation color: "blue" style: Enums.SimpleMarkerSymbolStyleDiamond size: 10 } GraphicsLayer { id: graphicsLayerGeocode } GraphicsLayer { id: graphicsLayerReverse } Graphic { id: locationGraphicReverse symbol: simpleMarkerSymbolReverseLocation } Graphic { id: locationGraphicGeocode symbol: simpleMarkerSymbolLocation } Envelope { id: usExtent xMax: -15000000 yMax: 2000000 xMin: -7000000 yMin: 8000000 spatialReference: mainMap.spatialReference } onMouseClicked: { graphicsLayerReverse.removeAllGraphics(); var graphic1 = locationGraphicReverse.clone(); graphic1.geometry = mouse.mapPoint; graphicsLayerReverse.addGraphic(graphic1); locator.reverseGeocode(mouse.mapPoint, 500, mainMap.spatialReference); } } ServiceLocator { id: locator url: "http://maps.dhalahore.org/ArcGIS/rest/services/DHAMAP/AddressLocator/GeocodeServer" onFindStatusChanged: { if (findStatus === Enums.FindStatusCompleted) { progressBar.visible = false; if (findResults.length < 1) { showError("No address Found"); } else { for (var i = 0; i < findResults.length; i++) { var result = findResults; var graphic = locationGraphicGeocode.clone() graphic.geometry = result.location; graphicsLayerGeocode.addGraphic(graphic); } mainMap.zoomTo(graphic.geometry); } } else if (findStatus === Enums.FindStatusErrored) { progressBar.visible = false; showError(findError.message + "\nNo Address Found"); } } onReverseGeocodeStatusChanged: { if (reverseGeocodeStatus === Enums.ReverseGeocodeStatusCompleted) { searchBox.descriptionTextVisibility = true; searchBox.descriptionTextInput = "Address: " var address = reverseGeocodeResult.addressFields["Address"]; var city = reverseGeocodeResult.addressFields["City"]; var state = reverseGeocodeResult.addressFields["Region"]; var zip = reverseGeocodeResult.addressFields["Postal"]; searchBox.descriptionTextInput += address + " " + city + ", " + state + " " + zip; } else if (reverseGeocodeStatus === Enums.ReverseGeocodeStatusErrored) { showError(reverseGeocodeError.message + "\nNo Address Found"); searchBox.descriptionTextVisibility = false; } } } LocatorFindParameters { id: findTextParams text: searchBox.searchTextInput outSR: mainMap.spatialReference maxLocations: 1 searchExtent: usExtent sourceCountry: "US" } /*----------------------------------------------------------------------------------------------------------------------- Search button / box ---------------------------------------------------------------------------------------------------------------------*/ SearchBox { id: searchBox anchors { left: parent.left top: parent.top margins: 20 * scaleFactor } onSearch: { findTextParams.text = searchBox.searchTextInput graphicsLayerGeocode.removeAllGraphics(); locator.find(findTextParams); progressBar.visible = true; } onClear: { mainMap.extent = usExtent; mainMap.mapRotation = 0; graphicsLayerGeocode.removeAllGraphics(); graphicsLayerReverse.removeAllGraphics(); searchBox.descriptionTextInput = ""; searchBox.searchTextInput.focus = true; searchBox.descriptionTextVisibility = false; searchBox.searchTextInput = ""; } Keys.onReturnPressed: { findTextParams.text = searchBox.searchTextInput graphicsLayerGeocode.removeAllGraphics(); locator.find(findTextParams); progressBar.visible = true; Qt.inputMethod.hide(); } } Row { anchors { horizontalCenter: parent.horizontalCenter bottom: mainMap.bottom bottomMargin: 5 * scaleFactor } ProgressBar { id: progressBar indeterminate: true visible: false } } MessageDialog { id: messageDialog title: "Error" icon: StandardIcon.Warning modality: Qt.WindowModal standardButtons: StandardButton.Ok text: errorMsg } Rectangle { id: rectangleBorder anchors.fill: parent color: "transparent" border { width: 0.5 * scaleFactor color: "black" } } function showError(errorString) { errorMsg = errorString; messageDialog.visible = true; } } Any Info would be greatly appreciated. Cheers, "Tasadduq Hussain"
... View more
04-04-2017
09:44 PM
|
0
|
7
|
2534
|
POST
|
Using Geocode Online sample code.I am using my owned prepared locator Geocode service (http://maps.dhalahore.org/ArcGIS/rest/services/DHAMAP/AddressLocator/GeocodeServer ) in code. It's working perfect on Reverse Geocoding (click map address displayed in search box) but giving the Error (Unable to complete operation. No Address Found) when i perform searching in search box. Please help me. Regards, Muhammad Afzal
... View more
04-02-2017
10:12 PM
|
0
|
0
|
398
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|