I have a GroupFilter setup with multiple groups. When switching between the groups and querying," zoom to" doesnt seem to work properly. It either zooms to full extent or doesnt zoom at all and then i have to hit "Apply" twice or more to get the widget to query and zoom again. Is this a known issue?
The widget works fine when I only have one group in the filter.
Sowjanya,
Are you using an esri base map in WKID 102100 or some custom basemap in another WKID?
We are using the ESRI Basemap clipped to our territory.
Sowjanya,
The reason I ask is the error is coming from this line:
var newExt = (geometryEngine.geodesicBuffer(results.extent, 10, 9002, false)).getExtent();
Which means the geometryEngine.geodesicBuffer(results.extent, 10, 9002, false) is returning null.
geodesicBuffer should only be used on WebMercator or Geographic geometry. So either the results.extent is null or is in some wkid besides WebMercator or Geographic.
Probably best to call tech support and see if this is a bug.
Thanks rscheitlin.
Just verified that all our data thats being used is in WebMercator.
Initial troubleshooting in tech support concluded that the error 'getExtent' of null is the result of the query request that has no extent in the result.
Like below.
{"count":0,"extent":{"xmin":"NaN","ymin":"NaN","xmax":"NaN","ymax":"NaN"}}
the error 'getExtent' of null is the result of the query request that has no extent in the result.
Like below.
{"count":0,"extent":{"xmin":"NaN","ymin":"NaN","xmax":"NaN","ymax":"NaN"}}
we can add additional checking in the Widgets/GroupFilter/widget.js line ~~1327 for function _queryExtentToZoom to check if the xmax,xmin,ymax.xmin value is not NaN like below
_queryExtentToZoom: function(results) {
if(typeof(results.extent) !== 'undefined' && results.extent !== null ) {
if(results.extent.xmax !== 'NaN' || results.extent.xmin !== 'NaN' || results.extent.ymax !== 'NaN' || results.extent.ymin !== 'NaN') {
var newExt = (geometryEngine.geodesicBuffer(results.extent, 10, 9002, false)).getExtent();
............
}
}
},