GoTo method

Zooms to the best map view for the specified location.

Applies to

Objects:  Location

Syntax

object.GoTo

Parameters

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

Remarks

This method was available for use with the Pushpin object in previous versions of MapPoint, but that is now obsolete. See the Obsolete functions topic for more information.

Example

    Sub ZoomToLocation()

  Dim objApp As New MapPoint.Application   Dim objMap As MapPoint.Map   Dim objLoc As MapPoint.Location
  'Set up the application   Set objMap = objApp.ActiveMap   objApp.Visible = True   objApp.UserControl = True
  'Get a location, then zoom to the best map view of this location   Set objLoc = objMap.FindResults("Seattle, WA").Item(1)   objLoc.GoTo
  End Sub

Note  This sample code is specific for use in MapPoint North America; it is for illustration purposes only.