var SPREADSHEET_ID = '1F73AWjT5A5nTRfPjwplEdhW2rqkGMMbrDX5PGAzYWGk';
var SHEET_NAME = 'Data';
  
function doGet(request) {
  var callback = request.parameters.jsonp;
  var range = SpreadsheetApp.openById(SPREADSHEET_ID).getSheetByName(SHEET_NAME).getDataRange();
  var json = callback + '(' + Utilities.jsonStringify(range.getValues()) + ')';
  
  return ContentService.createTextOutput(json).setMimeType(ContentService.MimeType.JSON);
}

function testDoGet(){
  var request = {parameters: {jsonp: 'callback'}};
  var results = doGet(request);
  Logger.log(results.getContent());
}
  
var SPREADSHEET_ID = '1F73AWjT5A5nTRfPjwplEdhW2rqkGMMbrDX5PGAzYWGk';
var SHEET_NAME = 'Data';
  
function doGet(request) {
  var callback = request.parameters.jsonp;
  var range = SpreadsheetApp.openById(SPREADSHEET_ID).getSheetByName(SHEET_NAME).getDataRange();
  var json = callback + '(' + Utilities.jsonStringify(range.getValues()) + ')';
  
  return ContentService.createTextOutput(json).setMimeType(ContentService.MimeType.JAVASCRIPT);
}

function testDoGet(){
  var request = {parameters: {jsonp: 'callback'}};
  var results = doGet(request);
  Logger.log(results.getContent());
}
  

Set MIME Type to JAVASCRIPT
Set MIME Type to JAVASCRIPT

I was able to recreate your error when `return ContentService.createTextOutput(json).setMimeType(ContentService.MimeType.JSON)`

When I changed it to `return ContentService.createTextOutput(json).setMimeType(ContentService.MimeType.JAVASCRIPT)`, the map worked.

I'm not 100% confident about why, but here's my hunch. This macro, is being added to the map as JavaScript. Then the function runs and returns JSON.Thus, when your browser tries to pull in the macro when the MIME type is set to JSON, it gets confused because it's not getting JSON. Rather, it's getting JavaScript.

This may be totally wrong, but I got the same error you had when