VDS Technologies

 

Map.CenterAndZoom()

12/19/2014 2:22:51 AM
Total Posts 5

Map.CenterAndZoom()

How to assign value to the CentreandZoom function of Map?

12/19/2014 10:45:26 AM
MVP
Total Posts 323

Re: Map.CenterAndZoom()

Please look at the ZoomToZoomLevel.aspx.cs sample:

protected void Page_Load(object sender, System.EventArgs e)
{
  map.MapUnit = MeasureUnit.Degree;

  // add zoom levels              level  scale
  // --------------------------------------------
  map.ZoomLevels.Add(1000000); // 0      MaxScale
  map.ZoomLevels.Add(100000);  // 1
  map.ZoomLevels.Add(10000);   // 2      MinScale

  AddLayers();

  if (!IsPostBack)
  {
    // set the initial zoom
    map.CenterAndZoom(new AspMap.Point(1.2939, 52.6331), 0);
  }
}