AnsweredAssumed Answered

ArcGIS API For JS - Search faster with the Search Widget

Question asked by pmccord_wayne on Aug 13, 2020
Latest reply on Aug 13, 2020 by odoe

I'm using the Search tool to allow users to enter their address and be taken to their property of interest. This is for a parcel viewer application with over 800,000 records. Ideally, when the user enters their address in the Search, they will quickly be zoomed to their location of interest. However, right now it takes about 13 seconds for the Search to retrieve their address and zoom to the correct address. It's worth noting that all of the functionality is working (ie, the map eventually zooms to the location that was entered), it's just very slow.

 

The parcel layer that is being searched is the same parcel layer that is displayed on the map (called parcelLyr in the below code). Below is the code for the search tool:

 

//Create search tool to search addresses
    const searchTool = new Search({
        view: myView,
        sources: [
            {
                layer: parcelLyr
                searchFields: ["propstreet", "fullAdd2"],
                displayField: "fullAdd2",
                name: "LayerSearchSource",
                placeholder: "example: 500 Griswold",
                exactMatch: false,
                suggestionsEnabled: true,
                autoNavigate: false,
                resultGraphicEnabled: false,
                outFields: ["*"]
               
            }
           
        ],
        container: addressSearchBar,
        includeDefaultSources: false,
        resultGraphicEnabled: false,
        popupEnabled: false,
        locationEnabled: false,
        searchAllEnabled: false
    })

 

Is there something I can do to ensure that the correct address is retrieved more quickly?

 

Thanks,

Paul

Outcomes