import * as React from 'react'; import { ViewBoxBaseComponent } from '../../DocComponent'; import { FieldView, FieldViewProps } from '../FieldView'; import { MapBox } from './MapBox'; /** * Map Pushpin doc class */ export class MapPushpinBox extends ViewBoxBaseComponent() { public static LayoutString(fieldKey: string) { return FieldView.LayoutString(MapPushpinBox, fieldKey); } componentDidMount() { this.mapBoxView.addPushpin(this.Document); } componentWillUnmount() { this.mapBoxView.deletePushpin(this.Document); } get mapBoxView() { return this._props.DocumentView?.()?._props.docViewPath().lastElement()?.ComponentView as MapBox; } get mapBox() { return this._props.DocumentView?.()._props.docViewPath().lastElement()?.Document; } render() { return
; } }