Share via


PixelSize property

Returns the size of a pixel for the specified map view, in GeoUnits (miles or kilometers) at the center of the screen. Read-only Double.

Applies to

Objects:  Map

Syntax

object.PixelSize

Parameters

Part Description
object Required. An expression that returns a Map object.

Remarks

The scale is never uniform across the screen, especially for flat maps. As the altitude is lower, the scale is more uniform.

To return or set GeoUnits, use the Units property of an Application or MappointControl object.

Example

  
    Sub GetPixelSizeAfterMapZoom()

Dim objApp As New MapPoint.Application
Dim objMap As MapPoint.Map

'Set up the application
Set objMap = objApp.ActiveMap
objApp.Visible = True
objApp.UserControl = True

'Get the pixel size before and after a map zoom
MsgBox "The pixel size for a new map is: " _
    + CStr(objMap.PixelSize)

objMap.ZoomIn

MsgBox "The pixel size after zooming in is: " _
    + CStr(objMap.PixelSize)

End Sub