eSearch Searching Query

1710
17
Jump to solution
01-05-2017 04:53 PM
RodWoodfordOld
Occasional Contributor III

Hi Robert,

I have a particular app that is using the eSearch widget and have had a request to configure on startup that the BY VALUE and BY SHAPE search functions start with different Map Service URLs. Basically operators will conduct a textual search using the BY VALUE option to gather results for URL1, with the map zooming in and then by clicking on the highlighted zoomed to property gather results from the second URL. Is this possible to configure?

example

BY VALUE configured to search on URL expression 1

BY SHAPE configured to search on URL expression 2

cheers 

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Rod,

  OK do this then. Same thing at the very end of the _initLayerSelect function:

setTimeout(lang.hitch(this, function(){
  this.selectLayerGraphical.set('value', 2);
}), 500);

View solution in original post

0 Kudos
17 Replies
RobertScheitlin__GISP
MVP Emeritus

Rod,

   The by shape requires a shape to be drawn though..?

0 Kudos
RodWoodfordOld
Occasional Contributor III

Yep I know and it has. Clients currently start the app and manually change the BY SHAPE search dropdown to the required search criteria and then tab back to the BY VALUE search to get this methodolgy to work. It's a workaround and works. I was just wondering if I could configure esearch some how so the clients don't need to do this. Thanks for the fast response.

cheers

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

I guess I am still trying to get this clear in my head. So you want a search url to set the layer for the by shape to a certain search layer index and another search url parameter to set the by value search layer index to a different layer?

0 Kudos
RodWoodfordOld
Occasional Contributor III

Yep see steps below, if you get time try it on this app.

https://citymaps.bayswater.wa.gov.au/WABexternal/LandMapping/index.html

1. By value is defaulted to "Property Information" searching.

2. By shape is also by defaulted  to "Property Information". The client manually changes it to  "Waste information"

3. The client then tabs back to the BY VALUE search to get "Property Information" result.

4. Then clicks on the zoomed highlighted property to get BY SHAPE to "Waste information" result.

Hope this helps.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Rod,

   OK in the Widget.js file in the onAttributeLayerChange method I set the ByShape drop down to be the same as the ByValue drop down. You can make this change:

        //set the graphical layer to be the same
        //this.graphicLayerIndex = newValue;
//2 is the zero based index of the layer number index in the by shape dropdown list
        this.selectLayerGraphical.set('value', 2); 
RodWoodfordOld
Occasional Contributor III

Thanks Robert, I'll this next week.

cheers

0 Kudos
RodWoodfordOld
Occasional Contributor III

Hi Robert,

This change to the widget.js file does work, however we have noticed that the user needs to activate the by value dropdown list on app start-up for this change the activate. Can this be automated at app start up.

cheers

Rod

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Rod,

  OK i thought you said that was you workflow. Find the _initLayerSelect and at the very end of that function add this line:

this.selectLayerGraphical.set('value', 2); 
0 Kudos
RodWoodfordOld
Occasional Contributor III

Thanks for the prompt reply. This change this.selectLayerGraphical.set('value', 2);  doesn't seem to make any difference. Users still need to engage the by value dropdown menu for the by shape to reflect the app change. Sorry.

cheers

0 Kudos