If I understand correctly, you would like to add custom area and distance measurement functionality within a context.
Please follow the steps below:
From the MapStore homepage, click Add Resource → Create Context
Ensure that the Measure plugin is selected along with any other required plugins, then save the context.
Override any plugin configuration based on the plugin feature supported for custom behavior
Use this context to load the Measure tool and perform measurement operations
For more details, please refer to the following documentation:
• UI documentation: https://docs.mapstore.geosolutionsgroup.com/en/latest/user-guide/measure
• Plugin documentation: https://mapstore.geosolutionsgroup.com/mapstore/docs/api/plugins#plugins.Measure