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
Solved! Go to Solution.
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);
Rod,
The by shape requires a shape to be drawn though..?
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
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?
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.
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);
Thanks Robert, I'll this next week.
cheers
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
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);
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