AckerApple / agm-overlays

Custom marker overlay for the @agm/core package
MIT License
25 stars 24 forks source link

Rendering different data on behalf of zoom level #3

Closed pnrdk closed 6 years ago

pnrdk commented 6 years ago

Thanks very much for providing this plug.in! It is helping med a lot :-)

But I am having a problem. I need to render different data on behalf of the zoom level, and I have almost made a solution. I am using the event zoomChange on agm-map, and in that event function I am switching data. but when I do that the map is changing zoom level :-/ If I use the same approach with agm-marker, it is working like it should.

Do you have any ideer why it is changing zoom level?

It look like the problem is in AgmOverlay.component.ts line 80

Thanks very much in advance :-)

AckerApple commented 6 years ago

A more formal answer will follow, on iPad right now. We call a google maps function call fitBounds to auto focus on a group of custom overlays. We need a one way binding to disengage that auto bounding zoom.

Will get back to you. Your claim legit, been thinking about it myself

AckerApple commented 6 years ago

We've removed the fitBounds being automatically called in new version 1.1.2

I will get back to you on the what to show based on zoom, request. In version 1.1.2, we also now show how clustering custom overlays is possible. Perhaps this would suite your needs?

AckerApple commented 6 years ago

Closing this old issue that has been resolved with the fitBounds tweak a few releases ago