cheesegrits / filament-google-maps

Google Maps package for Filament PHP
247 stars 69 forks source link

Zoom property $zoom is not working in the Google Map Widget #121

Closed kingmaker-agm closed 1 month ago

kingmaker-agm commented 1 month ago

Issue

I'm using the Google Map Widget (extending Cheesegrits\FilamentGoogleMaps\Widgets\MapWidget) in my Filament App.

I have set the Zoom value using the class property.

protected static ?int $zoom = 8;

Expected Behavior

The Google Map widget would have Zoom out (to the level of 8)

Actual Behavior

But the Zoom values are not reflected in the rendered Widget. The Map is Zoomed In to the maximum level (level 20)

Example

Actual Screenshot

Other Questions

I have a Couple more questions regarding the Map Widget as well.

1) How can I change the data (obtained from the $this->getData()) to be reflected in the displayed Map? 2) How to programmatically update the Markers in the Widget from within the Widget class?

navidsafavi commented 1 month ago

@kingmaker-agm use this option protected static ?bool $fitToBounds = false;

kingmaker-agm commented 1 month ago

This helped me to solve the Issue.

kingmaker-agm commented 1 month ago

Can someone help me with the Questions in the Issue #122 ?