Is your feature request related to a problem?
I was trying to add a couple of new event handlers:
public Task<Listener> OnRotate( Action<...> handler, string? layerId = null ) =>
AddListener( "rotate", handler, layerId );
public Task<Listener> OnRotate( Func<..., Task> handler, string? layerId = null ) =>
AddAsyncListener( "rotate", handler, layerId );
public Task<Listener> OnPitch( Action<...> handler, string? layerId = null ) =>
AddListener( "pitch", handler, layerId );
public Task<Listener> OnPitch( Func<..., Task> handler, string? layerId = null ) =>
AddAsyncListener( "pitch", handler, layerId );
But realized that there is no suitable event model, so I had to create my own.
Describe the solution you'd like
Would be nice to have these included in the library.
public enum MapEventType
{
Rotate,
Pitch
}
public class MapLibreEvent
{
[JsonPropertyName( "type" )]
[JsonConverter( typeof( JsonStringEnumConverter ) )]
public required MapEventType Type { get; set; }
}
Describe alternatives you've considered
No response
MapLibre JS Reference
Example Usage
Additional context
No response
Contribution
Is your feature request related to a problem?
I was trying to add a couple of new event handlers:
But realized that there is no suitable event model, so I had to create my own.
Describe the solution you'd like
Would be nice to have these included in the library.
Describe alternatives you've considered
No response
MapLibre JS Reference
Example Usage
Additional context
No response
Contribution