I’m totally confused at this point. I’m trying to use a request to grab an image from mapquest, but I’m getting an Unexpected indentifier.
I’m using a request elsewhere successfully, but I have something like:
let mapUrl = `https://www.mapquestapi.com/staticmap/v5/map?key=${mapKey}&locations=${car_data.latitude},${car_data.longitude}&zoom=${mapZoomLevel}&format=png&size=${mapSizeQuery}&type=${mapType}&defaultMarker=marker-${mapIconColorPosition}`;
console.log(mapUrl);
var req = new Request(mapUrl);
let mapImage = await req.loadImage();
But I get an “Unexpected identifier ‘req’. Expected ‘;’ after variable declaration.” on the last line.
I will admit that this is buried in some code that updates an object function:
theme.medium.draw = function(widget,car_data,colors){
blah... blah...
Which is probably related, but I have zero clue what the problem is. Anyone have some insight into this?