I'd like to be able to set the map source through Google Apps Script. From
reading this thread it appears that the methodology is through the
client-side API. Is there a way to accomplish this by sourcing and html
file within Google apps script with a doGet? I set up a simple example:
index.html
<html>
<head>
<script>Enter code here...
google.script.run.doSomething();
</script>
</head>
<body>
</body>
</html>
test.gs
function doGet(){
return HtmlService.createHtmlOutputFromFile('Index');
}
function doSomething(){
Logger.log("What");
}
I published the project to the web and if I visit the link, then
doSomething executes but if I call the url with urlfetchapp only the doGet
executes but not doSomething
UrlFetchApp.fetch(theURL,{method:"Get", headers: {Authorization: "Bearer
"+ScriptApp.getOAuthToken()}, muteHttpExceptions: true});
If I can get that framework working, is it possible then to just include
the following line in the html file
<script type='text/javascript' src='https://www.google.com/jsapi'></script>
and then be able to do anything 'google.visualization' within the .gs
script?
On Friday, April 24, 2020 at 10:16:26 PM UTC-4, Andrew Arnold wrote:
>
> JS county map files for every state (inc. Puerto Rico) and the United
> States can be downloaded here:
> https://drive.google.com/open?id=1j7yGIG7xmGuQ0yOptkeJK8txBA9aYvMM
>
> These were generated from KML files maintained by the U.S. Census Bureau.
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-visualization-api/4ce8200e-f31f-4b38-a428-0f198f9467eeo%40googlegroups.com.