In my JS API app I have a function to export some features into an image through ExportImage REST API operation. So I need an extent, but I don't want to zoom on it, I simply compute it from the geometry:
var extent = esri.graphicsExtent(featureSet.features); Problem is that some of the sets may be very small and some very large and the result is overlayed over other layers which have min and max scale, so I need the extent's scale to handle this (probably extent.expand(x), perhaps a zoom to a subset). I know esri.geometry.getScale(), but it takes map as the argument. Either I can dance with the map's extent (but I don't want to zoom to the features to be printed), or make a new Map instance (I don't need it for anything but the export) - is there any better option?
أكثر...
var extent = esri.graphicsExtent(featureSet.features); Problem is that some of the sets may be very small and some very large and the result is overlayed over other layers which have min and max scale, so I need the extent's scale to handle this (probably extent.expand(x), perhaps a zoom to a subset). I know esri.geometry.getScale(), but it takes map as the argument. Either I can dance with the map's extent (but I don't want to zoom to the features to be printed), or make a new Map instance (I don't need it for anything but the export) - is there any better option?
أكثر...