rungwiroon / BlazorGoogleMaps

Blazor interop for GoogleMap library
MIT License
325 stars 105 forks source link

What is the best way to fit all markes on the map view? #95

Closed SeppPenner closed 3 years ago

SeppPenner commented 3 years ago

I found your Recenter method, but it changes the last marker's position. Is there an easy alternative to center the map around all markers in it?

valentasm1 commented 3 years ago

Check markers demo page FitBounds https://github.com/rungwiroon/BlazorGoogleMaps/blob/master/ServerSideDemo/Pages/MapMarker.razor.cs

You could request bounds from markers or group. I dont have exact example but i am sure this page will help

SeppPenner commented 3 years ago

Ok, I will need to check this a bit more than :)

SeppPenner commented 3 years ago

Sorry :D I didn't find a solution yet, but nobody has complained about it either yet in my project :)

I should have closed the issue already.

valentasm1 commented 3 years ago

If it is not secret what kind a project are you working on?

SeppPenner commented 3 years ago

If it is not secret what kind a project are you working on?

Well, it is property of the company I'm working for so I can't share any details. I can tell you, however, that it's a LoRa application server similar to Chirpstack, but written in C# using the Microsoft Orleans framework to handle distributed systems.

And I can tell you, that your map component seems to be the only one that currently works as desired :D Even paid solutions like the one from Syncfusion we tested is not really satisfying.