Hi Robert,
Great widget. A small query about an error I am getting using graphical search. In our viewer if I tick on the "buffer graphic" option and then draw a polygon, the following error is returned:
"Wrong unit type (expected linear unit, got angular unit, or vice versa)"
Looking at it in fiddler, the error occurs on the call to the geometry service to create the buffers. The buffer spatial reference passed to the geometry service in our viewer is GDA94 geographics, the same coordinate system as our services, and I was attempting to buffer using metres. The documentation for the geometry service says that when buffering a line or polygon, if the buffer Spatial Reference is geographic, the buffer unit must be angular, so presumably this is the cause of the error.
My question is - where does the widget get the buffering spatial reference? Is it from the service you are searching? I note that in your calcounty example of the widget the bufferSR passed to the geometry service is a projected SR (Albers Equal Area Conic).
Testing on the rest endpoint of our geometry service, if I replicate the rest call from the esearch widget, substituting the buffer SR passed (4283 - GDA geographics) with a projected SR (e.g. NSW Lamberts - 3308) I get a result. Is there a way to change the buffer SR passed by the eSearch widget so we can force it to use a projected SR?
If not, can I suggest this as a future enhancement - to have an optional config item for buffer SR.
Many thanks,
Ben