currently, Widget Studio uses for all maps with postal codes & FSA visualizations a combination of MVT rendering from which we extract geojson polygon data in React Maps, which can also be used for elevation visualization
however, this solution proved to be not the best choice when we have very large nrs of polygons
this PR tries to solve the above problem making the following changes for polygon data:
For polygons we allow now two ways of rendering: using geojson layer for when we have geojson data & pure MVT layer for when we don't have configuration for elevation visualization
For this, I added a Use MVT Render button to switch between the two ways of rendering the polygons, giving the option to the user to use the best rendering method for the data they are dealing with
Given the above changes, the Labels feature will only be available to polygons rendered with geojson layers
Also, the pure MVT rendering for fill visualization will not adjust the viewport to data extent, because of lack of coordinate data
To limit performance issues, for pure MVT rendering for Postal Codes we are only allowing map visualization at higher zoom levels. If the user zooms out too much, a message will appear to inform that a higher zoom level is needed for Postal Code visualization
https://www.notion.so/eqproduct/Dashboard-add-MVT-layer-to-Widget-Studio-d1be434011414afbb40202e578bf7c85?pvs=4
Closes #200
Changes:
Map Widget
Use MVT Render
button to switch between the two ways of rendering the polygons, giving the option to the user to use the best rendering method for the data they are dealing withLabels
feature will only be available to polygons rendered with geojson layersPostal Codes
we are only allowing map visualization at higher zoom levels. If the user zooms out too much, a message will appear to inform that a higher zoom level is needed for Postal Code visualizationTest Story