Using remote project mode

map.apps for Developers can also be used in the so-called remote project mode.

In remote project mode map.apps for Developers pulls required JavaScript dependencies from a remote map.apps installation. This allows you to reference and use any bundles that are deployed to it.

These can be, for example, bundles that are developed by another team member or another team in your company. With remote project mode enabled, you can reference these bundles locally and use them for your own bundle development.

Checklist

To follow this guide, you need:

Step 1: Enable the remote project mode

To enable the remote project mode you have to make a change to the pom.xml file within map.apps for Developers.

  1. Open the pom.xml file and search for the following property declaration:

    <mapapps.remote.base>.</mapapps.remote.base>
  2. Change the value of the property mapapps.remote.base to the desired remote map.apps installation:

    <mapapps.remote.base>http://www.example.com/mapapps</mapapps.remote.base>

And that’s it. You are ready to run map.apps for Developers in remote project mode.

Step 2: Run the development server

To run the map.apps for Developers development server in remote project mode, you can either use the command line directly or run a prepared task in Visual Studio Code.

Run from the command line

To run the development server from the command line, issue the following command in the map.apps for Developers project root folder:

mvn compile -Denv=dev

Run inside Visual Studio Code

To run the development server in remote project mode, follow these steps:

  1. Open the map.apps for Developers project in Visual Studio Code

  2. Click TerminalRun TaskRun (Remote project mode) from VS Code’s top-most menu.

Your browser will automatically come up.

Next steps

When your map.apps for Developers project runs in remote project mode, you might want to