We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43b920b commit a7a088dCopy full SHA for a7a088d
src/extractor/scripting_environment_lua.cpp
@@ -259,7 +259,11 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context)
259
"version",
260
&osmium::Way::version,
261
"get_nodes",
262
- [](const osmium::Way &way) { return sol::as_table(&way.nodes()); },
+ [&context](const osmium::Way &way) {
263
+ sol::table nodes(context.state, sol::create);
264
+ for(const osmium::NodeRef& nr : way.nodes()){ nodes.add(nr); }
265
+ return nodes;
266
+ },
267
"get_location_tag",
268
[&context, &get_location_tag](const osmium::Way &way, const char *key) {
269
// HEURISTIC: use a single node (last) of the way to localize the way
0 commit comments