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

Widget - change markers without refresh map #105

Open
jcesarbueno opened this issue May 13, 2024 · 8 comments
Open

Widget - change markers without refresh map #105

jcesarbueno opened this issue May 13, 2024 · 8 comments

Comments

@jcesarbueno
Copy link

Hi,

How can I change the markers on the map widget without refreshing the whole map?

@abdallahisham
Copy link

Having the same issue here, @jcesarbueno did you find a solution?

@mikestmike
Copy link

Any update here?

@kingmaker-agm
Copy link

Any Update on this?

I too am stuck with this Issue.

@mikestmike
Copy link

@kingmaker-agm
Copy link

@mikestmike Can you help us out by sharing the code?

@mikestmike
Copy link

In the class i have a method that fetches locations based on dates whereBetween

View:

<div>
    <div class="w-full">
        <gmp-map center="{{ $mapCenter }}" zoom="10" map-id="sessions" style="height: 350px;">
            @foreach ($locations as $location)
                <gmp-advanced-marker position="{{ $location['latitude'] }}, {{ $location['longitude'] }}"
                    title="{{$location->name}}"></gmp-advanced-marker>
            @endforeach
        </gmp-map>
    </div>
</div>


@push('scripts')
    <script
        src="https://maps.googleapis.com/maps/api/js?key={{ env('GOOGLE_MAPS_API_KEY') }}&loading=async&libraries=marker&v=beta&solution_channel=GMP_CCS_complexmarkers_v3"
        defer></script>
        <style >
            gmp-advanced-marker {
                touch-action: none; 
                position: absolute; 
                left: 0px; 
                pointer-events: none; 
                transform: translate(-50%, -100%) translate(0px, 0px); 
                will-change: transform;
            }
        </style>
@endpush

@jeevanthelife
Copy link

Has anybody figured out the solution to this issue?

@abdallahisham
Copy link

@jeevanthelife I just give up after a a lot of days and used https://github.com/webbingbrasil/filament-maps for that purpose only, the widget. but the downside it uses openstreetmaps not google maps

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

No branches or pull requests

5 participants