Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LeafletGraphicProvider

The LeafletGraphicProvider class is an implementation of GraphicProvider. This provider has several static functions for storing and retrieving MapGraphic in 'buckets'.

example



var map = new LeafletMap();
map.create("map", { initialXMin: -88.679196, initialYMin: 24.326418, initialXMax: -79.57153, initialYMax: 30.892178 });
var geoJSON = { type: "Feature", geometry: { type: 'LineString', coordinates: [[-82.441, 29.200], [-82.441, 29.535]] }, properties: { } };
var mGraphic = { id: '1', feature: geoJSON, shape: 'LineString' };
var cb = map.addGraphic(mGraphic);
mGraphic.id=cb.id;
mGraphic.dispose=cb.dispose;
LeafletGraphicProvider.registerGraphic(mGraphic, "default");

Hierarchy

  • LeafletGraphicProvider

Implements

Index

Constructors

constructor

Properties

Private _map

_map: any

map

  • get map(): LeafletMap
  • Property map is a LeafletMap

    Returns LeafletMap

Static blue

blue: string = "#0000FF"

Static green

green: string = "#00FF00"

Static red

red: string = "#FF0000"

Static yellow

yellow: string = "#FFFF00"

Methods

clearAllGraphics

  • clearAllGraphics(): void
  • clearAllGraphics(): void
  • clearAllGraphics(): void
  • Clear all the graphics from all of the buckets.

    Returns void

  • Clear all the graphics from all of the buckets.

    Returns void

  • Clear all the graphics from all of the buckets.

    Returns void

graphic

  • graphic(feature: Feature | GeometryObject, options?: GraphicOptions): Disposable
  • graphic(feature: Feature | GeometryObject, options?: GraphicOptions): Disposable
  • graphic(feature: Feature | GeometryObject, options?: GraphicOptions): Disposable
  • Put a feature or geometry on the map.

    Parameters

    Returns Disposable

    [[Core.Disposible]] that removes the feature or geometry from the map.

  • Put a feature or geometry on the map.

    Parameters

    • feature: Feature | GeometryObject
    • Optional options: GraphicOptions

    Returns Disposable

    [[Core.Disposible]] that removes the feature or geometry from the map.

  • Put a feature or geometry on the map.

    Parameters

    • feature: Feature | GeometryObject
    • Optional options: GraphicOptions

    Returns Disposable

    [[Core.Disposible]] that removes the feature or geometry from the map.

Static clearAllGraphics

  • clearAllGraphics(): void
  • clearAllGraphics(): void
  • clearAllGraphics(): void
  • Clear all the graphics from all of the buckets.

    Returns void

  • Clear all the graphics from all of the buckets.

    Returns void

  • Clear all the graphics from all of the buckets.

    Returns void

Static clearGraphics

  • clearGraphics(bucketid: string): void
  • clearGraphics(bucketid: string): void
  • clearGraphics(bucketid: string): void
  • Clear all the graphics from the specified bucket.

    Parameters

    • bucketid: string

      string

    Returns void

  • Clear all the graphics from the specified bucket.

    Parameters

    • bucketid: string

      string

    Returns void

  • Clear all the graphics from the specified bucket.

    Parameters

    • bucketid: string

      string

    Returns void

Static convertArgb

  • convertArgb(argb: string): string
  • convertArgb(argb: string): string
  • convertArgb(argb: string): string
  • convert to hex

    Parameters

    • argb: string

      string

    Returns string

  • convert to hex

    Parameters

    • argb: string

      string

    Returns string

  • convert to hex

    Parameters

    • argb: string

      string

    Returns string

Static createNewGraphicBucket

  • createNewGraphicBucket(bucketId?: string): string
  • createNewGraphicBucket(bucketId?: string): string
  • createNewGraphicBucket(bucketId?: string): string
  • Parameters

    • Optional bucketId: string

      string

    Returns string

    the new id

  • Parameters

    • Optional bucketId: string

      string

    Returns string

    the new id

  • Parameters

    • Optional bucketId: string

      string

    Returns string

    the new id

Static getGraphic

  • getGraphic(id: string, bucketid: string): MapGraphic
  • getGraphic(id: string, bucketid: string): MapGraphic
  • getGraphic(id: string, bucketid: string): MapGraphic
  • Parameters

    • id: string

      string

    • bucketid: string

      string

    Returns MapGraphic

  • Parameters

    • id: string

      string

    • bucketid: string

      string

    Returns MapGraphic

  • Parameters

    • id: string

      string

    • bucketid: string

      string

    Returns MapGraphic

Static getGraphicOptions

  • getGraphicOptions(color?: string, fillColor?: string): GraphicOptions
  • getGraphicOptions(color?: string, fillColor?: string): GraphicOptions
  • getGraphicOptions(color?: string, fillColor?: string): GraphicOptions
  • Parameters

    • Optional color: string

      string

    • Optional fillColor: string

      string

    Returns GraphicOptions

    a GraphicOptions

  • Parameters

    • Optional color: string

      string

    • Optional fillColor: string

      string

    Returns GraphicOptions

    a GraphicOptions

  • Parameters

    • Optional color: string

      string

    • Optional fillColor: string

      string

    Returns GraphicOptions

    a GraphicOptions

Static getGraphics

  • getGraphics(bucketid: string): MapGraphic[]
  • getGraphics(bucketid: string): MapGraphic[]
  • getGraphics(bucketid: string): MapGraphic[]
  • Parameters

    • bucketid: string

      string

    Returns MapGraphic[]

  • Parameters

    • bucketid: string

      string

    Returns MapGraphic[]

  • Parameters

    • bucketid: string

      string

    Returns MapGraphic[]

Static registerGraphic

  • registerGraphic(graphic: MapGraphic, bucketid: string): void
  • registerGraphic(graphic: MapGraphic, bucketid: string): void
  • registerGraphic(graphic: MapGraphic, bucketid: string): void
  • Parameters

    Returns void

  • Parameters

    • graphic: MapGraphic
    • bucketid: string

      string

    Returns void

  • Parameters

    • graphic: MapGraphic
    • bucketid: string

      string

    Returns void

Static removeGraphic

  • removeGraphic(id: string, bucketid: string): void
  • removeGraphic(id: string, bucketid: string): void
  • removeGraphic(id: string, bucketid: string): void
  • Parameters

    • id: string

      string

    • bucketid: string

      string

    Returns void

  • Parameters

    • id: string

      string

    • bucketid: string

      string

    Returns void

  • Parameters

    • id: string

      string

    • bucketid: string

      string

    Returns void

Object literals

Static Private graphicBuckets

graphicBuckets: object

default

default: MapGraphic[] = <MapGraphic[]>[]