Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto-fitBounds - WIP #868

Closed
wants to merge 1 commit into from
Closed

auto-fitBounds - WIP #868

wants to merge 1 commit into from

Conversation

sebholstein
Copy link
Owner

@sebholstein sebholstein commented Jan 24, 2017

This is a WIP Pull request!

This adds a new service named FitBoundsService. For every AgmMap component, a new instance gets created. The service computes the LatLngBounds for all given elements of the map.
The idea is that all core and custom child components of AgmMap inject that service to add or remove itself from the bounds. The should also provide a new Input named fitBounds (is the name a good idea?) to give the user the option to remove the element from the bounds. The default value of these fitBounds inputs should be true.

The LatLngBounds of the FitBoundsService are exposed as an Observable. The AgmMap component subscribes to this observable:

To enable auto-fitBounds, you have to set the fitBounds input to true:

<agm-map [fitBounds]="true">
  <agm-marker [latitude]="33" [longitude]="40"></agm-marker>
  <agm-marker [latitude]="33" [longitude]="40" [fitBounds]="false"></agm-marker>
</agm-map>

// cc @lazarljubenovic @jinder

@GitCop
Copy link

GitCop commented Jan 24, 2017

There were the following issues with your Pull Request

  • Commit: 6ff1d85
  • Commits must be in the following format: %{type}(%{scope}): %{description}

Contribution guidelines are available at https://github.com/SebastianM/angular2-google-maps/blob/master/CONTRIBUTING.md


This message was auto-generated by https://gitcop.com

@Jdruwe
Copy link

Jdruwe commented Feb 17, 2017

@SebastianM any updates on this? Would love this feature :)

@Opticsponge
Copy link

this dead?

@jacobuid
Copy link

jacobuid commented Mar 27, 2017

@SebastianM Can we get this!! This would be extremely helpful on your map

@sebholstein
Copy link
Owner Author

@Opticsponge no not dead but not finished yet :)

@rbarcelos
Copy link

Any update on this?

@hedata
Copy link

hedata commented May 23, 2017

having this would be amazing or an option so gmaps doesnt update position at all .. making me crazy updating my markers and google maps jumps around like crazy trying to fit bounds

@jakehockey10
Copy link

👍

@Anoxy
Copy link

Anoxy commented May 30, 2017

@SebastianM any updates on this ?

@craftpip
Copy link

craftpip commented Jun 1, 2017

+1, This is a must have feature.

@jimmykane
Copy link

Any update?

@TobiasVdb
Copy link

+1

@alexdaley
Copy link

+1 on this

@skie
Copy link

skie commented Sep 6, 2017

+1

2 similar comments
@matthiaslexer
Copy link

+1

@laureD2SI
Copy link

laureD2SI commented Nov 20, 2017

+1

@matiishyn
Copy link

any updates on this? Or maybe any alternative solutions?

@sebholstein sebholstein self-assigned this Dec 19, 2017
@naggingant
Copy link

👍

@mjrdnk
Copy link

mjrdnk commented Jan 25, 2018

What is the status of this merge?
Anyone taking care of it?

@sebholstein
Copy link
Owner Author

I'm closing this in favour of #1389

@ghost ghost deleted the auto-fit-bounds branch September 17, 2019 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.