PROBLEM
The problem may arise in which features from a layer are displayed despite the scale factors set of a given layer. In other words, scale factors are set -- the 'minscale' and 'maxscale' attributes -- in the LAYER element of the Map Configuration File with intentions that the layer is to display when the map's scale is within a specified range. Instead, some or all features from the layer are drawn beyond this range. Also, the features are highlighted.
In the HTML Viewer, the dimensions of the requested image match those of the viewer’s map frame despite what a user draws as a zoom-in or zoom-out rectangle with the mouse. For basic image requests, the spatial server calculates the image envelope based on the longest dimension of the requested zoom rectangle. However, the portion of HTML Viewer code that highlights selected features performs its calculations based on the width dimension only. In some requests, therefore, the scale of this request is significantly different than that of the overall image. As a result, highlighted features might get added to or dropped from the map incorrectly.
Code:
function addSelectToMap(){
Code:
function addSelectToMap(){
var selString = "";
var sFactor = (eRight-eLeft) / iWidth;
var aspectRatio=iWidth/iHeight;
var extentRatio=(eRight-eLeft)/(eTop-eBottom);
if (extentRatio<aspectRatio) sFactor = (eTop-eBottom)/iHeight;
if (((sFactor>=LayerMinScale[ActiveLayerIndex]) && (sFactor<=LayerMaxScale[ActiveLayerIndex])
&& (LayerVisible[ActiveLayerIndex]==1)) || (canSelectInvisible)) {
Article ID:000006250
Get help from ArcGIS experts
Download the Esri Support App