Share via


LineDriveMapSpecification Class

LineDriveMapSpecification Class

Contains the specifications for rendering a LineDrive map. Includes the Route to use and the LineDriveMapOptions.

Public Class LineDriveMapSpecification Inherits System.Object

[C#]
public class LineDriveMapSpecification : System.Object

Public Constructors

Name Description
public constructorLineDriveMapSpecification Constructor Initializes a new instance of the LineDriveMapSpecification class.

Public Properties

Name Description
public propertyRoute

The route (Route object) to render on the map.

public propertyOptions

The map rendering options (LineDriveMapOptions object), including the image format, font size, color palette, icon type, and return type.

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