AnsweredAssumed Answered

how to change the zoom scale for the geocoder?

Question asked by PAgisAdmin on Jun 9, 2015
Latest reply on Oct 22, 2015 by ah_keeper

I would like to set the geocoder to zoom to 1:1200.  I think I would change the expand.0.0625 for the Point geometry but I am not sure.

 

if (feature) {
          var resultGeometry = feature.geometry;
          if (resultGeometry.type === 'point') {
            anchorPoint = resultGeometry;
            zoomExtent = this.map.extent.centerAt(anchorPoint).expand(0.0625);
          } else if (resultGeometry.type === 'polyline') {
            anchorPoint = resultGeometry.getPoint(0, 0);
            zoomExtent = resultGeometry.getExtent().expand(1.1);
          } else if (resultGeometry.type === 'polygon') {
            anchorPoint = resultGeometry.getCentroid();
            zoomExtent = resultGeometry.getExtent().expand(1.1);
          } else if (resultGeometry.type === 'mulitpoint') {
            anchorPoint = resultGeometry.getPoint(0);
            zoomExtent = resultGeometry.getExtent().expand(1.1);
          } else {
            anchorPoint = resultGeometry;
            zoomExtent = this.map.extent;
          }

Outcomes