Currently the vector tiles embedding implementation creates a <img>
element in the HTML file, but the raw GeoJSON data is stilled stored in the HTMLWidgets JSON tag.
One way to alleviate this is to encode and compress the GeoJSON before transit to JS. This would require adding some dependencies (like a msgpack encoder, or another binary encoding library, i.e. CBOR), as well as C++ requirements (to keep it fast enough for large spatial data). This would also reduce the HTML file size, since there isn't duplicate data embedded.
Another option it to forgo embedding, and only work with the GeoJSON -- however, this is not optimal ๐ฌ.
The best outcome would be to remove the data from the JSON tag, but I'm not currently familiar with how this would be done...