Re-centers the map to a specified screen point.
Syntax
Visual Basic (Declaration) | |
---|
Public Overloads Overridable Function CenterAt( _
ByVal pixelX As Integer, _
ByVal pixelY As Integer _
) As ESRI.ArcGIS.ADF.Web.CartoImage |
Visual Basic (Usage) | Copy Code |
---|
Dim instance As View
Dim pixelX As Integer
Dim pixelY As Integer
Dim value As ESRI.ArcGIS.ADF.Web.CartoImage
value = instance.CenterAt(pixelX, pixelY) |
Parameters
- pixelX
- The X coordinate of the screen-point (pixel-point) on which you want the map re-centered.
- pixelY
- The Y coordinate of the screen-point (pixel-point) on which you want the map re-centered.
Return Value
New re-centered map image, in the form of a CartoImage object. Use CartoImage.Url to retrieve the image's URL.
Example
This example sets the MapView's height and width in pixels, along with an initial envelope, then re-centers the map based on a pixel location in the map.
C# | Copy Code |
---|
mapView.ImageDescriptor.Width = Convert.ToInt32(imgMap.Width.Value);
mapView.ImageDescriptor.Height = Convert.ToInt32(imgMap.Height.Value);
mapView.Extent = new Envelope(10, 30, 30, 50);
CartoImage resultImage = mapView.CenterAt(150, 50);
imgMap.ImageUrl = resultImage.Url; |
Visual Basic | Copy Code |
---|
mapView.ImageDescriptor.Width = CInt(imgMap.Width.Value)
mapView.ImageDescriptor.Height = CInt(imgMap.Height.Value)
mapView.Extent = New Envelope(10, 30, 30, 50)
Dim resultImage As CartoImage = mapView.CenterAt(150, 50)
imgMap.ImageUrl = resultImage.Url |
Remarks
Requirements
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
See Also