Share via


MapSpecification Class

MapSpecification Class

Contains the specifications for rendering a map. Includes the data source to use, map views, pushpins, route, selected entities, and map options.

Public Class MapSpecification
    Member of [Namespace]
[C#]
public class MapSpecification : System.Object
    Member of [Namespace]

Public Properties

public propertyDataSourceName A string representing the name of the data source (DataSource.Name property) to use to render a map. String. Required.
public propertyHighlightedEntityIDs An array of the IDs of geographic entities (Entity.ID property) that should appear as selected on the map. Valid array range is 0 through 50. Integer[]. Optional.
public propertyOptions The map rendering options (MapOptions object), such as image format, panning and zooming factors, identification of the requested map as an overview map, route highlight colors, font size, and map style. Optional.
public propertyPushpins An array of pushpins (Pushpin[] objects) to render on the map. Valid array range is 0 through 100. Optional.
public propertyRoute The route (Route object) to render on the map. Required if the Views property is null.
public propertyViews An array of map views (MapView[] objects) to render. One map image is returned for each map view. Valid array range is 0 through 50. Required if the Route property is null.

Remarks

  • The MapSpecification class is passed in the specification parameter of the RenderServiceSoap.GetMap method.
  • For the MapSpecification class to be valid, it must contain a valid DataSourceName property and the referenced data source must have a DataSource.Capability property value of CanDrawMaps.
  • To return the properties of a data source, use the CommonServiceSoap.GetDataSourceInfo method.
  • For a table of the MapPoint Web Service data sources and the functions they are capable of performing, see MapPoint Web Service Data Sources and Capabilities.
  • For the MapSpecification class to be valid, either the Views property must contain at least one map view or the Route property must contain a route. If the Route property is passed and the Views property is null, the map view of the entire route is used. If both the Route and Views properties are null, a SOAP fault is returned. If both the Route and Views properties are passed, the route is highlighted on the map and the Views property determines the map view.
  • To render a route, the passed Route object must contain at least a Route.CalculatedRepresentation or a Route.Specification property (the Route.Itinerary property is ignored). If it contains just a Route.Specification property, then the RenderServiceSoap.GetMap method calls the route service to calculate the route.
  • MapPoint Web Service constrains the map view in terms of how far the map is zoomed out or zoomed in. The constraints vary per data source and map style. If the Views or Options properties are set such that these limits would be exceeded, the returned map image is modified to meet the limit and the MapImage.View property contains the returned view.
  • If the Options property is null, the default property values of the MapOptions object are used.

See Also

DataSource.Name Property | Entity.ID Property | MapOptions Class | Pushpin Class | Route Class | MapView Class | RenderServiceSoap.GetMap Method | DataSource.Capability Property | CommonServiceSoap.GetDataSourceInfo Method | MapPoint Web Service Data Sources and Capabilities | MapImage.View Property