Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

ControlPosition enum in google-maps-types.d.ts contains the wrong identifiers. #1105

@codemasterover9000

Description

@codemasterover9000

ControlPosition enum in google-maps-types.d.ts contains the wrong identifiers.

Case: Place zoom buttons at top right.
Config: zoomControlOptions:ZoomControlOptions = { position: ControlPosition.TOP_RIGHT, style: ZoomControlStyle.LARGE }
Expectation: Zoom buttons appear at the top right of the map
Actual: Zoom buttons appear at bottom center

Version: 1.0.0-beta.0

For example to get the zoom controls at TOP_RIGHT position I actually have to use LEFT_BOTTOM.

Java script API ControlPosition

ControlPosition = 
{
        TOP_LEFT: 1,
        TOP_CENTER: 2,
        TOP: 2,
        TOP_RIGHT: 3,
        LEFT_CENTER: 4,
        LEFT_TOP: 5,
        LEFT: 5,
        LEFT_BOTTOM: 6,
        RIGHT_TOP: 7,
        RIGHT: 7,
        RIGHT_CENTER: 8,
        RIGHT_BOTTOM: 9,
        BOTTOM_LEFT: 10,
        BOTTOM_CENTER: 11,
        BOTTOM: 11,
        BOTTOM_RIGHT: 12,
        CENTER: 13
}

google-maps-types.d.ts

export declare enum ControlPosition {
    BOTTOM_CENTER = 0,
    BOTTOM_LEFT = 1,
    BOTTOM_RIGHT = 2,
    LEFT_BOTTOM = 3,
    LEFT_CENTER = 4,
    LEFT_TOP = 5,
    RIGHT_BOTTOM = 6,
    RIGHT_CENTER = 7,
    RIGHT_TOP = 8,
    TOP_CENTER = 9,
    TOP_LEFT = 10,
    TOP_RIGHT = 11,
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions