-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] MVTLayer layer breaks when used with the DataFilterExtension #8898
Comments
Hi, thanks for reporting a bug. Here are some things you can do to help a maintainer look into your issue:
|
This should provide an example of how to recreate the issue using an edited version of the cloudpen example for the scatterplot layer. Steps to reproduce
Expected outcome Actual outcome I am hoping I've just made a naive error in how I am doing it and you can point me in the direction of how to fix it :)
|
Description
When applying filters the filtering is not consistent and when applying a filter and removing it, and then re-applying it the data points on the map can change. Filtering does not work as expected.
Flavors
Expected Behavior
Applying the same filters with the same data should render the same data points but they change and jump around even though the point co-ordinates change.
Steps to Reproduce
Our configuration:
Data filter: new DataFilterExtension({ filterSize: 4, categorySize: 1 }
getFilterValue:
function getFilterValue(f: { properties }) { return [ new Date(f.properties.date_of_transfer).getTime() / 1000, Number(f.properties.total_floor_area) || 0, Number(f.properties.estimated_bedrooms_min) || 0, Number(f.properties.tenure === "F"), ]; }
Filter range:
const filterRange = [ [fromDate, toDate], // these are numbers [filters?.floorArea?.min || 0, filters?.floorArea?.max || Math.pow(2, 32) - 1], [filters?.bedrooms?.min || 0, filters?.bedrooms?.max || Math.pow(2, 32) - 1], [filters?.tenure !== "F" ? 0 : 1, filters?.tenure === "L" ? 0 : 1], ];
sample data props that are being filtered by:
"properties": { "date_of_transfer": "2015-09-01", "total_floor_area": "121.00", "estimated_bedrooms_min": 3, "tenure": "F" }
render subLayer props:
renderSubLayers(props) { return [ new GeoJsonLayer({ ...props, stroked: false, filled: true, pointType: "circle+text", getTextColor: [0, 0, 0, 255], textOutlineColor: [255, 255, 255, 255], getText: textAccessors[unitPreference][priceMode], getTextAngle: 0, getTextBorderWidth: 2, getTextAnchor: "middle", getTextPixelOffset: [0, -16], textSizeScale: 1, textSizeUnits: "pixels", textCharacterSet: characterSet, textFontFamily: "Helvetica Neue, Helvetica, Arial, sans-serif", textOutlineWidth: 5, getTextSize: 14, lineWidthUnits: "pixels", lineWidthMaxPixels: 1, lineWidthMinPixels: 1, lineWidthScale: 1, pointRadiusUnits: "pixels", getPointRadius: 12, pointRadiusMaxPixels: 12, getFillColor: [132, 204, 21, 255], getLineColor: [255, 255, 255, 255], getLineWidth: 2, textFontSettings: { sdf: true, fontSize: 32, buffer: 8, }, updateTriggers: { getFillColor: [priceMode, distribution], getText: [unitPreference, priceMode], }, }), ]; },
Data side note:
We are using the binary true with mvt data.
The issue:
The dots on the map do not filter correctly and 'jump' around.
Please let us know if you need further info
Environment
Logs
No response
The text was updated successfully, but these errors were encountered: