I am trying to load a GeoJSON file from a MySQL database but it is taking about 6-10 seconds to load the data into the map. This is what I have done so far.
I generate a GeoJSON file after doing a process which contains LineString geometries. The size of these files are about 4 to 5 MB. Then I store this data in a MySQL database. When I load the map I initiate the request of data from the MySQL database so that the data is in the client. I am currently using a button to load the GeoJSON into the map but it is taking long time (6 to 10 seconds).
I have seen some other posts similar to my issue which have suggested simplifying the geometry. But this is not an option for me right now.
Is there any other method to show this GeoJSON data faster?
I am showing data like this
var geojsondata = JSON.parse('data from mysql database already in the client side');
map.data.addGeoJson(geojsondata);