0

I have a set of google earth scripts which define some plots of land. They are named

plot1_use
plot2_use
plot3_use

and each exports a set of coordinates about the land.

I am getting an error importing a file by name when using a dynamic filename.

For example the following import works

var test = require("users/daniel/map:plot2_use");

but constructed versions of the same do not.

var test = require("users/daniel/map:plot" + 2 + "_use");
var test = require("users/daniel/map:plot" + "2" + "_use");
var test = require("users/daniel/map:plot" + 2 + "_use.js");

They all give the following error message

Line 24: Module not found at users/daniel/map:plot2_use

Any ideas what I am doing wrong?

0 Answers0