map.setExtent(esri.graphicsExtent(SearchPar[0].features).expand(5.2), true);
map.setExtent(esri.graphicsExtent(SearchPar[0].features).expand(5.2), true);The application focuses on the area of the map the end user selected and than expands back out. However the zoom level is not consistent if the area of the map is larger or smaller . For instance if the end user wants to see all the adjacent areas within a mile for a piece of property zoom will show this if it is a large section but not if it is a smaller section. So I am wondering if there is a way to make the focus consistent so the user can see the same things if the focus is on a large or small property.
var expandFactor = /* half of whatever distance in map units */; var newExtent = new esri.geometry.Extent({"xmin":map.extent.xmin-expandFactor,"ymin":ymin-expandFactor,"xmax":xmax+expandFactor,"ymax":ymax+expandFactor, "spatialReference":map.spatialReference}); map.setExtent(newExtent);
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.