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.

Bug: fitBounds counts old marker's positions #1512

@ghost

Description

When marker's position has been changed and it has [agmFitBounds]='true' directive, google.maps.LatLngBounds gets extended by new and old position. So agm-map is fitting both positions.

Steps to reproduce:

  1. Create instance with [fitBounds]="true" flag
  2. Insert inside agm-map with [agmFitBounds] directive
  3. Change programmatically latitude and longitude of marker

Current behavior:

  • fitsBounds uses new and old positions

Expected/desired behavior:

  • count only new position of observable marker

Versions:
Angular 6 & @agm/core: 1.0.0-beta.5

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions