My goal is let a user draw a route so they can submit it to the site.
In the following jsfiddle, a user can draw a route and double-click when finished. Double-click will bring up a Google Form with 'Location' field pre-populated with the KML coordinates. The user can submit it, and it goes to a Fusion Table for easy display down the line once it is approved.
Here is the jsfiddle. And the code:
//here is the variable with properly formatted KML
geolines=escape("<LineString><coordinates>")+poly.getPath().getArray().toString().replace(/([\s]+)/g, '')+escape("</coordinates></LineString>") ;
//infowindow that should display a form with Location field pre-populated with geolines variable for easy submission.
infowindowv2 = new google.maps.InfoWindow({
content: '<iframe width=600 height=300 scrolling=yes frameborder=no seamless src=https://docs.google.com/spreadsheet/embeddedform?formkey=dDN6WEJTMlNHT2VNMlZBOW1MZmI1Wnc6MQ&entry_0=Test1&entry_1='+ geolines +'&entry_2=test3%22 seamless></iframe>'
});
The problem is that if one zooms out and draws a more complicated route, the KML becomes too large very quickly and I get the following error: "413. That’s an error. Your client issued a request that was too large. That’s all we know." See here.
Now I am struck thinking about how I should get around it.
I like the way maps/forms/fusion tables work together and I would like to preserve this combination, but I am not sure how.
Any leads, ideas, suggestions would be appreciated. Thank you for looking.