terriajs icon indicating copy to clipboard operation
terriajs copied to clipboard

Make `getDataType` plugin-friendly

Open KeyboardSounds opened this issue 2 years ago • 0 comments

Currently, you can only add new file formats to getDataType by modifying terriajs directly. If you make a separate plugin that adds support for a new file format, you still have to modify terriajs, which is less than ideal. It means that your new format will appear in the "Add Data" format dropdown even if when your plugin isn't there and terriajs alone doesn't support the format.

https://github.com/TerriaJS/terriajs/blob/main/lib/Core/getDataType.ts

We probably need some sort of "register data type" function, similar to how we register catalog items, that allows these to be extended by plugins.

KeyboardSounds avatar Jun 30 '22 01:06 KeyboardSounds