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

Render and algorithm settings for MarkerClustererOptions #192

Merged
merged 3 commits into from
May 3, 2022

Conversation

TheAtomicOption
Copy link
Contributor

This makes it possible to set a custom render or algorithm function via MarkerClustererOptions without needing to host a custom version of objectManager.js to set the option when instantiating the js-markerclusterer object.

Example of usage is added to objectManager.js and MapMarker.razor.cs in ServerSideDemo, but commented out as most people will probably want the defaults.

@TheAtomicOption
Copy link
Contributor Author

added commit to fix typo for algorithm object pathing

@TheAtomicOption
Copy link
Contributor Author

After looking at this some more, both are implemented as classes by js-markerclusterer which helps when they have settings of their own. To handle that we'd likely pass a JsObjectRef as the parameter value instead. I think in that case though I'd want to use different property names to match anyway, so this isn't necessarily creating a future breaking change.

Does the method in this pull request seem like a worthwhile stopgap until I figure that out or should we not bother creating something we know will likely become obsolete?

@valentasm1 valentasm1 changed the title implement render and algorithm settings for MarkerClustererOptions Render and algorithm settings for MarkerClustererOptions May 3, 2022
@valentasm1
Copy link
Collaborator

I didnt understand last comment. I need more details with examples. In other hand just do as you think is right and mostly will pass my test :). I allow almost everything into this lib.
Maybe you meant smth like in Polyline CreatePath() method?

@valentasm1 valentasm1 merged commit b6546fb into rungwiroon:master May 3, 2022
@valentasm1
Copy link
Collaborator

I moved that commented code for example from objectManager.js to serverSide demo js.

@valentasm1
Copy link
Collaborator

https://www.nuget.org/packages/BlazorGoogleMaps/2.1.0

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

Successfully merging this pull request may close these issues.

2 participants