LineDriveMapImage Class

LineDriveMapImage Class

The image returned by the GetLineDriveMap method. Includes the image or a URL to get the image and the map view representations.

Public Class LineDriveMapImage Inherits System.Object

[C#]
public class LineDriveMapImage : System.Object

Public Constructors

Name Description
public constructorLineDriveMapImage Constructor Initializes a new instance of the LineDriveMapImage class.

Public Properties

Name Description
public propertyMimeData

The map image (MimeData object), which includes the image type, the MIME label, and the binary image.

public propertyUrl

The URL to access the map image, which is cached on a MapPoint Web Service server for a limited time. The URL uses either standard or secure hypertext protocol, depending on the LineDriveMapOptions.ReturnType property setting.

public propertyView

The representations of the view of the map (MapViewRepresentations class).

public propertyFirstDirectionID

The ID of the first driving direction that pertains to this map. Integer.

public propertyLastDirectionID

The ID of the last driving direction that pertains to this map. Integer.

Remarks

The GetLineDriveMap method may return more than one map. If you are displaying driving directions with each map that is returned, you can use the FirstDirectionID and LastDirectionID of each LineDriveMapImage object to ensure that the driving directions match each map.

Example

[Visual Basic]

'Create a LineDriveMapSpecification object, 
'set the LineDriveMapOptions, and then call
'the GetLineDriveMap method to generate the map
Dim format As New ImageFormat

format.Height = imgSize
format.Width = imgSize

Dim ldmo As New LineDriveMapOptions
ldmo.Format = format
ldmo.FontSize = MapFontSize.Smallest
ldmo.ReturnType = MapReturnType.ReturnUrl
ldmo.PaletteType = PaletteType.Color

Dim spec As New LineDriveMapSpecification
spec.Route = myRoute
spec.Options = ldmo
Dim mi() As LineDriveMapImage
mi = render.GetLineDriveMap(spec)

'check for multiple maps returned by GetLineDriveMap()
Dim x As Int16
       
For x = 0 To mi.Length -1
   'add your code here to handle drawing multiple maps
   RenderMap(mi(x).Url, x)
Next



[C#]

//Create a LineDriveMapSpecification object, 
//set the LineDriveMapOptions, and then call
//the GetLineDriveMap method to generate the map
ImageFormat format = new ImageFormat();
format.Height=imgSize;
format.Width=imgSize;

LineDriveMapOptions ldmo = new LineDriveMapOptions();
ldmo.Format = format;
ldmo.FontSize = MapFontSize.Smallest;
ldmo.ReturnType = MapReturnType.ReturnUrl;
ldmo.PaletteType = PaletteType.Color;

LineDriveMapSpecification spec = new LineDriveMapSpecification();
spec.Route=myRoute;
spec.Options = ldmo;
LineDriveMapImage[] mi = render.GetLineDriveMap(spec);

//check for multiple maps returned by GetLineDriveMap()
for (int x=0; x<mi.Length; x++)
{
 //add your code here to handle drawing multiple maps
     RenderMap(mi[x].Url, x);
}



See Also

  Using LineDrive Maps   |   RenderServiceSoap.GetLineDriveMap Method