Class descriptorMDNRestFeature

Creates an instance of a descriptor for describing content from a MapDotNet REST feature service.

class

descriptorMDNRestFeature

Index

Constructor methods

Methods

Constructor methods

constructor(mapId: string, layerId: string, options?: { version?: string; bleedRatio?: number; fieldNames?: string[]; clipToRenderBounds?: boolean; simplifyEnabled?: boolean; }): descriptorMDNRestFeature

Parameters

  • mapId: string
  • layerId: string
  • options?: { version?: string; bleedRatio?: number; fieldNames?: string[]; clipToRenderBounds?: boolean; simplifyEnabled?: boolean; } optional

Returns

descriptorMDNRestFeature

Methods

public getBleedRatio(): number

Gets the bleed ratio.

Returns

number

The current bleed ratio.

public getClipToRenderBounds(): boolean

Checks the flag whether to clip geometry fetched at the bounds of the request.

Returns

boolean

The value of the flag.

public getFieldNames(): Array<string>

Gets the optional field names to query. This attribute data may be used in dynamic client-side rendering.

Returns

Array<string>

An array of field names as strings.

public getLayerId(): string

Gets the layer's ID.

Returns

string

The layer's ID.

public getMapId(): string

Gets the map ID.

Returns

string

The map ID.

public getSimplifyEnabled(): boolean

Checks the flag whether to simplify paths based on the units per pixel for the quad tile being requested.

Returns

boolean

The value of the flag.

public getVersion(): string

Gets the version of the REST service.

Returns

string

The REST service version.

public setBleedRatio(br: number)

Sets the bleed ratio. Bleeds greater than 1.0 will fetch content beyond the edge of the tile extents (this is useful for point features).

Parameters

  • br: number

    The desired bleed ratio, a number between 1.0 and 2.0.

public setClipToRenderBounds(flag: boolean)

Sets the flag whether to clip geometry fetched at the bounds of the request. This can greatly improve performance with large complex geometries. Only supported when back-end store is SQL 2008/2012 or PostGIS.

Parameters

  • flag: boolean

    Whether or not to clip geometries fetched at the bounds of the request.

public setFieldNames(names: Array<string>)

Sets the optional field names to query. This attribute data may be used in dynamic client-side rendering.

Parameters

  • names: Array<string>
    • array of strings for each field to query

public setNotifyDescriptorChangeAction(action: () => void)

Sets the action to perform on descriptor change.

Parameters

  • action: () => void

    Function with signature action().

public setSimplifyEnabled(flag: boolean)

Sets the flag whether to simplify paths based on the units per pixel for the quad tile being requested.

Parameters

  • flag: boolean

    Whether or not to simply paths based on the units per pixel.

public setVersion(v: string)

Sets the REST service version number.

Parameters

  • v: string

    The version number to set.