Share via


Pushpin.PinID Property

The customer-defined pushpin identification, which is returned in the HotArea.PinID property of the returned map image. Ignored if the ReturnsHotArea property is set to False. String. Can be null. Can be repeated. Maximum number of characters is 256.

Public Dim PinID As String
    Member of [Namespace].Pushpin
[C#]
public System.String PinID
    Member of [Namespace].Pushpin

Remarks

  • You can use the PinID property to identify the pushpin; for example, you could use it to associate the pushpin with a URL to which you want the pushpin to link when you create a clickable map.

Example

 
[Visual Basic] 
'This example assumes that the service instance 
''renderService' has already been created and that 
'the MapPoint Web Service namespace has been imported 

'Get a map and mark the center point with a pushpin
Dim myViews(0) As ViewByHeightWidth
myViews(0) = New ViewByHeightWidth()
myViews(0).CenterPoint = New LatLong()
myViews(0).CenterPoint.Latitude = 40
myViews(0).CenterPoint.Longitude = -120
myViews(0).Height = 200
myViews(0).Width = 300

Dim myPushpins(0) As Pushpin
myPushpins(0) = New Pushpin()
myPushpins(0).PinID = "pin1"
myPushpins(0).IconDataSource = "MapPoint.Icons"
myPushpins(0).IconName = "3"
myPushpins(0).LatLong = myViews(0).CenterPoint
myPushpins(0).Label = "Center"

Dim mapSpec As New MapSpecification()
mapSpec.DataSourceName = "MapPoint.NA"
mapSpec.Views = myViews
mapSpec.Pushpins = myPushpins

Dim mapImages() As MapImage
mapImages = renderService.GetMap(mapSpec)

 
[C#]
//This example assumes that the service instance 
//'renderService' has already been created and that 
//the MapPoint Web Service namespace has been imported 

//Get a map and mark the center point with a pushpin
ViewByHeightWidth[] myViews = new ViewByHeightWidth[1];
myViews[0] = new ViewByHeightWidth();
myViews[0].CenterPoint = new LatLong();
myViews[0].CenterPoint.Latitude = 40;
myViews[0].CenterPoint.Longitude = -120;
myViews[0].Height = 200;
myViews[0].Width = 300;

Pushpin[] myPushpins = new Pushpin[1];
myPushpins[0] = new Pushpin();
myPushpins[0].PinID = "pin1";
myPushpins[0].IconDataSource = "MapPoint.Icons";
myPushpins[0].IconName = "3";
myPushpins[0].LatLong = myViews[0].CenterPoint;
myPushpins[0].Label = "Center";

MapSpecification mapSpec  = new MapSpecification();
mapSpec.DataSourceName = "MapPoint.NA";
mapSpec.Views = myViews;
mapSpec.Pushpins = myPushpins;

MapImage[] mapImages = renderService.GetMap(mapSpec);

 

See Also

Pushpin Class | HotArea.PinID Property | Pushpin.ReturnsHotArea Property