Description

Represents the functionality that an overlay wrapper should provide.

Extends

IGoogleMapsNativeObjectEmittingWrapper

Index

overlays/abstraction/base/i-google-maps-drawable-overlay.ts

Properties
Methods

Methods

attach
attach(map: IGoogleMap)

Assigns the overlay to the specified map. If possible, prefer using the appropriate GoogleMap.createXXX() method instead. If not possible, it is the responsability of the caller to add the overlay to the OverlayTracker in the GoogleMap.overlays object. Otherwise, inconsistencies and unexpected behaviours might occur.

Parameters:
Name Type Optional Description
map IGoogleMap No

The map to dispaly the overlay on.

Returns: void
detach
detach()

Removes the overlay from the specified map. If possible, prefer using the GoogleMap.removeOverlay() method instead. If not possible, it is the responsability of the caller to remove the overlay from the OverlayTracker in the GoogleMap.overlays object. Otherwise, inconsistencies and unexpected behaviours might occur.

Returns: void

Properties

map
map: IGoogleMap
Type: IGoogleMap

The map this overlay resides in.

type
type: OverlayType
Type: OverlayType

Useful when reflection is complex or not possible.

import { IGoogleMapsNativeObjectEmittingWrapper, IGoogleMap, IBounds } from '@bespunky/angular-google-maps/core';
import { IGoogleMapsNativeDrawableOverlay } from '../native/i-google-maps-native-drawable-overlay';
import { OverlayType                      } from './overlay-type.enum';

/**
 * Represents the functionality that an overlay wrapper should provide.
 *
 * @export
 * @interface IGoogleMapsDrawableOverlay
 * @extends {IGoogleMapsNativeObjectEmittingWrapper<TNative>}
 * @extends {IBounds}
 * @template TNative The type of native overlay being wrapped.
 */
export interface IGoogleMapsDrawableOverlay<TNative extends IGoogleMapsNativeDrawableOverlay>
         extends IGoogleMapsNativeObjectEmittingWrapper<TNative>, IBounds
{
    /** The map this overlay resides in. */
    readonly map : IGoogleMap;
    /** Useful when reflection is complex or not possible. */
    readonly type: OverlayType;

    /**
     * Assigns the overlay to the specified map. If possible, prefer using the appropriate `GoogleMap.createXXX()` method instead.
     * If not possible, it is the responsability of the caller to add the overlay to the `OverlayTracker` in the `GoogleMap.overlays` object.
     * Otherwise, inconsistencies and unexpected behaviours might occur.
     *
     * @param {IGoogleMap} map The map to dispaly the overlay on.
     */
    attach(map: IGoogleMap): void;
    /**
     * Removes the overlay from the specified map. If possible, prefer using the `GoogleMap.removeOverlay()` method instead.
     * If not possible, it is the responsability of the caller to remove the overlay from the `OverlayTracker` in the `GoogleMap.overlays` object.
     * Otherwise, inconsistencies and unexpected behaviours might occur.
     */
    detach(): void;
}

results matching ""

    No results matching ""