rungwiroon / BlazorGoogleMaps

Blazor interop for GoogleMap library
MIT License
309 stars 99 forks source link

Fixed positioning of standard controls and tidied up xml comments #304

Closed Enritski closed 7 months ago

Enritski commented 7 months ago

Several of the "options" classes for the "standard" GoogleMaps controls had enum properties that were not decorated with [JsonConverter(typeof(EnumMemberConverter<T>))] attribute. This caused the position property not to be honoured when adding them to the map. Changed the MapTypeControlStyle from a class with string constants, to an enum. Applied the EnumMember attribute to it to specify how it should be serialized. Actually, had to use 0, 1, and 2 instead of "DEFAULT", "HORIZONTAL_BAR", and "DROPDOWN_MENU" to get it to work. Tidied up xml comments throughout the codebase - including fixing incorrectly formatted characters (< and >) that caused the xml comment to be ignored. Moved one comment from InfoWindow to MarkerList, which is obviously where it was intended to go. Fixed a few minor typos.

valentasm1 commented 7 months ago

In ideal world would be better to have separate commit just for grammar :). Only one quite important part. You could not just rename public (protected in this case) method. You mark obsolete and link to new one. This one will throw warnings and i assume i high quality code base (important business) will fix this even before next release. Then in upcoming release you just drop obsolete code. I am talking about ComputeMathingKeys -> ComputeMatchingKeys

Big thumb up for update demo to check new enums

valentasm1 commented 7 months ago

Thank you one more time https://www.nuget.org/packages/BlazorGoogleMaps/4.0.2

Enritski commented 7 months ago

In ideal world would be better to have separate commit just for grammar :).

Sorry, yes, I should have done it as a separate commit.

Only one quite important part. You could not just rename public (protected in this case) method. You mark obsolete and link to new one. This one will throw warnings and i assume i high quality code base (important business) will fix this even before next release. Then in upcoming release you just drop obsolete code. I am talking about ComputeMathingKeys -> ComputeMatchingKeys

Very good point - I'll be more careful in future!