You may not always want to create a new model and layer when the user opens a new file. Instead, you want to add the data from that file to an existing model and layer.
To add data to an existing model and layer, implement your own
As explained in Loading data in Lucy, when an
ALcyDataSourceHandler is used to handle data, it is up to that handler to determine how to open the data.
For this requirement, the
Decode the contents of the file.
Check whether the map component already contains a model to which the data can be added.
If there is such a model, add the data to that model.
If there is no such model, create a model, populate it with the data, and add the model to the map.