0

I use 3.16 and I have got some problem.

When I try to execute FindTask

        require(["esri/tasks/FindTask", "esri/tasks/FindParameters"], function (FindTask, FindParameters) {
            console.log("Hello from FindTask");
            var findtask = new FindTask({
                url: "someWorkingURL"
            });
            var findparams = new FindParameters();
            findparams.returnGeometry = true;
            findparams.layerIds = layersIDs;
            findparams.searchFields = ["MYVALUE"];

            findparams.searchText = data["myValue"];
            findtask.execute(findparams, drawObject, drawError);
        });

I do not see writing "Hello from FindTask". In ArcGIS Manager I see that querying is allowed.

Where may problem be?

P.S. In network page in Firefox i see "304 not modified"

Answer: I changed hosts of my app http-requests to localhost and everything is good now. Also, I downloaded JS API and set localhost as host there. I think, the problem was in mismatched hosts: I've deployed my app on my computer with corporate IP address as host but HTTP-requests have gone to localhost.

0

Answer: I changed hosts of my app http-requests to localhost and everything is good now. Also, I downloaded JS API and set localhost as host there. I think, the problem was in mismatched hosts: I've deployed my app on my computer with corporate IP address as host but HTTP-requests have gone to localhost.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.