When searching or querying a polygon feature class, the portal web map and WABDE 2.5 applications zoom to the wrong extent on some of the feature results. I have been able to work around this in the search widget with:
Ln 740: this.map.setExtent(result.feature.geometry.getExtent().expand(1.5));
This expands the extent on the features that zoom in too far with the WABDE application, but when completing this search in Portal web map, its still zooms in too far.
Also, I have a need to query the same feature class using the URL parameters, which I complete with:
https://webadapter.site.gov/wab_buildinglocator/?query=FeatureClass,FieldName=%27Value%27
This query works correctly, but also returns the same wrong extent on the same features as first experienced in the search. Where can I change this so the URL query result is the same as the search?
Or better yet.. why is the wrong extent being returned? On the popup window that displays with the "Zoom To" link, the feature extents are always correct when clicking that link.
Thanks
Solved! Go to Solution.
So the SetExtent function with URL parameters is defined in MapUrlParamsHandler.js.
Ln 387
map.setExtent(resultExtent.expand(1.5)); //Added .expand(1.5) to extent result
WAB application now returns the same result as the modified search.
So the SetExtent function with URL parameters is defined in MapUrlParamsHandler.js.
Ln 387
map.setExtent(resultExtent.expand(1.5)); //Added .expand(1.5) to extent result
WAB application now returns the same result as the modified search.