mapbox-unity-sdk
mapbox-unity-sdk copied to clipboard
operator "Is Equal" is wrong
v1.4 At vector layer visualizer -> Filters The effect of "is equal" is "<=" but not "=="
@dingfengboo nice catch, you probably already found it but changing LayerPropertyIsEqualFilterComparer class to this fixes the issue;
[Serializable]
public class LayerPropertyIsEqualFilterComparer : LayerHasPropertyFilterComparer
{
public double Min;
protected override bool PropertyComparer(object property)
{
if (property == null)
{
return false;
}
var propertyValue = Convert.ToDouble(property);
if (propertyValue > Min - Mapbox.Utils.Constants.EpsilonFloatingPoint &&
propertyValue < Min + Mapbox.Utils.Constants.EpsilonFloatingPoint)
{
return true;
}
return false;
}
}
fix merged, thanks again @dingfengboo