radzen-blazor
radzen-blazor copied to clipboard
added ability to customize markers and default cursor
- added parameter IconSrc in RadzenGoogleMapMarker for customize markers
- added parameter DraggingCursor in RadzenGoogleMap for customize default cursor
- modified page in demo project for use case
I was certainly looking for the ability to customise markers. It this likely to be incorporated?
hi, can you tell when this request will be reviewed?
Sorry for the very late feedback.
Unfortunately we cannot accept this pull request as it is.
The current issues are:
- Does not follow naming convetions e.g. data_markers - we do not use underscore in the middle of variable names,
- I don't fully understand the purpose of IsShouldRender. No other component has such a property and it is very hard to reason what it does and how/when to use it.
- The customizeMap JS function shouldn't support just the drag cursor. Ideally it should accept an options object that can be directly passed to setOptions.
Issues 1 and 3 have been resolved
IsShouldRender property is needed to block all markers from updating when the afterrender method is called. for example on the demo page, this happens when the map is clicked or when the parent component is rendered.
Added usage example of this property to demo page
There should be a better way to handle this without the need of this IsShouldRender property. I am afraid we can't accept such API.
Update handling is implemented inside the component.
Please review last changes
I thoroughly reviewed the pull request and believe we should implement those features ourselves. The current implementation seems overly complex and we don't fully understand it in order to merge it in the library and continue supporting it.
We will probably expose a Parameter called options which will be passed directly to setOptions
.
<RadzenGoogleMap Options=@(new Dictionary<string, object> { { "draggingCursor", "myCursor" }, { "disableDefaultUI", true } })>
And we will make sure zoom and center are not reset while markers are updated.