-
-
Notifications
You must be signed in to change notification settings - Fork 859
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
Thoughts on refactoring architecture #490
Comments
@johnpryan I know you want a new maintainer, but do you think it makes sense to follow up to this? |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Would like to see this disucssed |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
any chance that we talk about this again @johnpryan |
Couple of questions, as I'm not an expert on the package, but not many replies!
Probably a separate side point, I think you can use your own coordinate system as it currently, but I may be wrong ? I think just if there's rearchitecturing things, the gains must be very obvious. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
Hi,
I implemented my own map view recently because we needed a completely different coordinate system for this app but I looked a lot at yours to get inspirations.
One thing that I always didn't like was the way the Layers were created with flutter_map and I decided here to go a different way which I want to show you
This here is my mapview (I removed unimportant stuff):
As you can see I add factories for my layers als parameter here. LayerDefinition id defined:
and for the different layers you derive a new LayerDefinition which can get any additional parameters like:
This approach is much cleaner and more direct than the current one with a big switch to check which type the LayerOption is and then call a factory function.
By this I can easy pass in a Stream to forward any data changes only the Layer it concerns instead to rebuild the whole map_view.
In the map_view build function it looks like this:
When using this MapView it looks like this:
I just wanted to show this as a starting point if the package could move in this direction instead of moving all to plugins. The direct passing of LayerFactories is so much easier to understand and more powerfull than this here:
Which requires that all Layer types have to use the same parameters and to pass any other options over an Options object.
Please don't get me wrong, you created an awesome package. Perhaps we can improve the architecture a bit.
Cheers
Thomas
The text was updated successfully, but these errors were encountered: