I currently have a SQL database setup with about 80 thousand lat, long points. My goal is to take this data and create HTML to generate a Folium map that has all of these points represented on it (I am using the marker cluster method). The problem I am facing is that when I import this data in Python and generate HTML, every single coordinate is represented on the file as text:
var icon, marker;
icon = L.AwesomeMarkers.icon({
icon: "map-marker", markerColor: "red"});
marker = L.marker(new L.LatLng(row[0], row[1]));
marker.setIcon(icon);
marker.bindPopup("Individual Wind Turbine")
return marker;
};
;
var data = [[36.501724, -99.787033], [36.437126, -99.725624], [36.444931, -99.769722], [36.513935, -99.80706]
and so on for all the thousands of points.
I am trying to see if there is a method to load the data without having every single coordinate generated onto the HTML file itself, or if there is any other mapping method I could use to create this map. My current approach is to create a python function to fetch the SQL data and then make a marker cluster in my python file to generate an HTML file.
As a note, I have also tried to load my data onto a json file and load the json into the HTML, which works, but I would rather use a method that does not require every single data point to be written out somewhere.