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

Extend useful map wrapper functions #1617

Closed
wants to merge 1 commit into from

Conversation

jeff-up
Copy link

@jeff-up jeff-up commented Mar 14, 2019

Adding these functions provides the user with the ability to get the bounds, center, or zoom on initialization/without having to rely on an event being triggered. Additionally, if the user is doing some expensive computation in event handlers, they can chose to do do them in the idle event handler as opposed to the any of the event handlers that update through the entire map transformation.

@codecov
Copy link

codecov bot commented Mar 14, 2019

Codecov Report

Merging #1617 into master will decrease coverage by 0.11%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1617      +/-   ##
==========================================
- Coverage   30.64%   30.53%   -0.12%     
==========================================
  Files          36       36              
  Lines        1540     1546       +6     
  Branches      125      125              
==========================================
  Hits          472      472              
- Misses       1066     1072       +6     
  Partials        2        2
Impacted Files Coverage Δ
packages/core/directives/map.ts 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 03ceb1c...eaec5c7. Read the comment docs.

@jeff-up
Copy link
Author

jeff-up commented Apr 24, 2019

@SebastianM, I'm not sure what I need to change here. Could you point me in the direction as to what is causing the codecov failures?

@ghost
Copy link

ghost commented May 30, 2019

what would this be used for?

@jeff-up
Copy link
Author

jeff-up commented May 31, 2019

Specifically for me, when I create an instance of the map I am setting the zoom and the center. From there I need the bounds so I can show a list view of the items on the map next to the map. When a user interacts with the map I can get the new bounds from a change event, but without the functions I added there is no way to get the initial values of zoom, center, or bounds without seeing them yourself.

@ghost
Copy link

ghost commented Jun 1, 2019

you can listen to a boundsChange event
https://angular-maps.com/api-docs/agm-core/components/agmmap#boundsChange

@stale
Copy link

stale bot commented Aug 30, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 30, 2019
@stale stale bot closed this Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant