Skip to content

MediaLayerOptions 'Opacity' needs floating point value  #98

@bfenwick806

Description

@bfenwick806

In the MediaLayerOptions class there is a property Opacity which is defined as integer.
At the moment this makes it impossible to specify the opacity of an Image Layer when adding one to the map as all values are rounded to the nearest integer.
When used to create an ImageLayer it actually requires a floating point value between 0 and 1 to be passed down through the eventual JSInterop call, necessitating that the property in the class should supporting floating point values.

public abstract class MediaLayerOptions : LayerOptions
{
public int? Contrast { get; set; }

  public int? FadeDuration { get; set; }

  public int? HueRotation { get; set; }

  public int? MaxBrightness { get; set; }

  public int? MinBrightness { get; set; }

  public int? Opacity { get; set; }

  public int? Saturation { get; set; }

}

The specification for these parameters is available at:
https://learn.microsoft.com/en-us/javascript/api/azure-maps-control/atlas.imagelayeroptions?view=azure-maps-typescript-latest

It looks as though Brightness and Saturation require floating point values as well.

Thank you for the excellent control!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions