To a large extent, your only choice for this is to have pre-simplified data sets that load according to the zoom level. That is, after each increase, you will need to determine whether to upload a new, higher resolution dataset for the region to which the user has zoomed. If so, you need to clear the existing elements and add new ones.
That would be quite a lot of effort. At this point, you can also have pre-processed bitmap fragments (for example, on Google Maps) and use a library like Leaflet , which makes a heavy lift for you. In addition to this pre-prepared map, you can still use D3 for dynamic material.
source share