When added to a VMC view tree as the <vmc-upload-shapefile> element, adds a custom widget to the map that accepts user-defined shapefiles, as a .zip archive, as input to the widget. The user shapes are added to the map via a GraphicsLayer.

Usage example:

<vmc-map>
<vmc-upload-shapefile></vmc-upload-shapefile>
</vmc-map>

Hierarchy

  • UploadShapefileComponent

Implements

  • OnInit

Constructors

Properties

_expand$: BehaviorSubject<boolean> = ...
_filename: BehaviorSubject<undefined | string> = ...
_graphicsLayer: GraphicsLayer = ...
_position$: BehaviorSubject<VmcWidgetPosition | UIAddPosition> = ...
_state: BehaviorSubject<UploadShapefileState> = ...
accept: string = '.zip'

The filetypes that are accepted as uploads. By default, only .zip files are accepted. This value is passed to the native HTMLInputElement's accept attribute.

If the UX doesn't sit well for your app, this can be overridden. However, as of this date, only .zip is supported for upload.

allowShapeTypes: UploadShapefileShapeTypes = ...

The shape types that the widget will allow the user to upload. By default, all Esri supported geometries are accepted. If the user attempts to upload an unsupported shape type, they'll receive an error message in the widget's UI.

destroy$: Observable<null>
filename$: Observable<undefined | string> = ...

An observable stream of the user-submitted filename.

formEl: ElementRef<HTMLFormElement>
goToOptions: any = {}

An object of GoToOptions2D or GoToOptions3D that will be passed to the MapView or SceneView goTo method, as appropriate.

header: null | string = 'Add a Shapefile (.zip)'

An input property that controls the text of the header element that is visible on the widget.

inputEl: ElementRef<HTMLInputElement>
lineSymbology: any = ...

An input property to define the default Symbol for line geometries. Supports auto-casting.

pointSymbol: any = ...

An input property to define the default Symbol for point geometries. Supports auto-casting.

polygonSymbol: any = ...

An input property to define the default Symbol for polygon geometries. Supports auto-casting.

portalUrl: null | string = null

An input property containing the URL of the Portal that will be used to generate the graphics features.

This property is used to construct a REST API URL following this format: ${portalUrl}/sharing/rest/content/features/generate

resetStates: UploadShapefileState[] = ...
showHelpText: boolean = true

If true, help text will be displayed on the widget.

state$: Observable<UploadShapefileState> = ...

An observable stream of the widget state

uploadShapefileService: UploadShapefileService
view$: Observable<null | MapView | SceneView> = ...
viewBase: ViewBase
when$: Observable<any> = ...

Used to indicate the map view is ready. Widget rendering depends on this observable emitting. This avoids an issue where the widget would flash on the page, aka premature rendering.

widgetId: string = 'vhbUploadShapefileWidget'

Events

expandReady: EventEmitter<null | Expand> = ...

An Angular event that emits the Expand widget instance or null

resetClick: EventEmitter<MouseEvent> = ...

An Angular event that emits the native click event when the "Reset" button is clicked by the user.

uploadGraphics: EventEmitter<Graphic[]> = ...

An Angular event of an array of Esri Graphics that have been uploaded to via this widget.

Accessors

  • get expand(): boolean
  • Returns boolean

  • set expand(val: boolean): void
  • An Input parameter that, if true, configures this component to place the widget behind an Esri Expand widget.

    Parameters

    • val: boolean

    Returns void

  • get graphicsLayer(): GraphicsLayer
  • Get a reference to this widget's Esri GraphicsLayer.

    Returns GraphicsLayer

  • set graphicsLayer(val: null | GraphicsLayer): void
  • An optional input parameter of an Esri GraphicsLayer that will be populated with the uploaded shapefiles. Otherwise, the component provides its own.

    Remark

    If passed null, this input does not operate.

    Parameters

    • val: null | GraphicsLayer

    Returns void

  • set position(val: VmcWidgetPosition | UIAddPosition): void
  • The Esri UIAddPosition describing where in the Map's UI the widget should be placed.

    Parameters

    • val: VmcWidgetPosition | UIAddPosition

    Returns void

Methods

  • Parameters

    • response: RequestResponse

    Returns void

  • Parameters

    • graphic: Graphic

    Returns Graphic

  • Private

    Returns void

  • Parameters

    • evt: null | Expand

    Returns void

  • Private

    Parameters

    • event: null | Event

    Returns Promise<void>

  • Private

    Parameters

    • event: MouseEvent

    Returns void

Generated using TypeDoc