Member Junction
    Preparing search index...

    MapViewComponent — Leaflet-based map visualization for geo-enabled MJ entities.

    Reads __mj_Latitude and __mj_Longitude from entity records (or custom field overrides) and renders them as interactive markers on an OpenStreetMap tile layer.

    Supports three rendering modes:

    • point (default): Individual markers with optional clustering
    • choropleth: Region shading by country/state (requires BoundaryGeoJSON)
    • heatmap: Density visualization

    Delegates all rendering logic to @memberjunction/geo-maps. This component is a thin Angular wrapper managing lifecycle, inputs/outputs, and IntersectionObserver-based deferred initialization.

    Implements

    • OnInit
    • AfterViewInit
    • OnDestroy
    • OnChanges
    Index

    Constructors

    Properties

    BoundaryField: string = 'BoundaryGeoJSON'

    Field name containing GeoJSON boundary data on each record (for boundary mode).

    DisplayState: Partial<MapDisplayState> | null = null

    Persisted display state from UserView.

    DisplayStateChange: EventEmitter<MapDisplayState> = ...

    Emitted when display state changes (for persistence).

    Entity: EntityInfo

    Entity metadata for the displayed records.

    IsLoading: boolean = true
    LatitudeField: string = '__mj_Latitude'

    Latitude field name. If left at the default, auto-resolves to the field on Entity tagged with ExtendedType='GeoLatitude'.

    LongitudeField: string = '__mj_Longitude'

    Longitude field name. Same auto-resolution as LatitudeField.

    MarkerClick: EventEmitter<MapMarkerClickEvent> = ...

    Emitted when a marker is clicked.

    MarkerCount: number = 0
    Records: Record<string, unknown>[] = []

    Array of entity records to render on the map. Accepts BaseEntity[] or plain Record objects.

    RegionClick: EventEmitter<MapRegionClickEvent> = ...

    Emitted when a choropleth region is clicked.

    RenderMode: MapRenderMode = 'point'

    Current render mode.

    RenderModeChange: EventEmitter<MapRenderMode> = ...

    Emitted when render mode changes (supports two-way binding: [(RenderMode)]).

    TotalRecordCount: number = 0

    Total record count from the server (before any client-side cap). When this exceeds the number of Records passed in, the map shows a truncation indicator so the user knows not all data is displayed.

    Accessors

    • get HasBoundaryField(): boolean

      True when the entity has a per-record boundary GeoJSON field — gates the Boundary toolbar button.

      Returns boolean

    • get IsTruncated(): boolean

      Whether the displayed records are truncated (more exist than were loaded).

      Returns boolean

    Methods

    • A callback method that is invoked immediately after Angular has completed initialization of a component's view. It is invoked only once when the view is instantiated.

      Returns void

    • A callback method that is invoked immediately after the default change detector has checked data-bound properties if at least one has changed, and before the view and content children are checked.

      Parameters

      • changes: { [propName: string]: SimpleChange<any> }

        The changed properties.

      Returns void

    • A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.

      Returns void

    • A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.

      Returns void