* @param funObj
* @return
*/
public static Object write(Context cx, Scriptable thisObj,
Object[] args, Function funObj) {
GeoObject geo = null;
if (args.length == 1) {
Object geoObj = args[0];
if (geoObj instanceof GeoObject) {
geo = (GeoObject) geoObj;
}
}
if (geo == null) {
throw ScriptRuntime.constructError("Error",
"The write function expects a single object argument");
}
return geo.getJson();
}