Below is the method used to zoom in to a particular location using the coordinates. Unlike MapExtreme, ArcGIS uses ZoomFactor to zoom in and zoom out instead of ZoomWidth in MapExtreme.
Method:
private void ZoomToCoordinates()
{
ESRI.ArcGIS.ADF.Web.Geometry.Point center = null;
try
{
center = new ESRI.ArcGIS.ADF.Web.Geometry.Point(17.7244, 1.1883);
// Numeric value is the Zoom factor(1-10 ZoomsIn & 0 to 1 ZoomsOut)
Map1.Zoom(2, center);
}
catch (Exception)
{
throw;
}
finally
{
center = null;
}
}
No comments:
Post a Comment