Skip to main content

2. Using resources in your app

When you build a custom app, you probably want to include external resources like images. To get these working in GeoApps, you need to provide the path to the resource from your html, css or any text file.

To resolve the issue that the exact path is not known, we provide the possiblity to use a path which begins with ~/. When you reference for instance the path ~/images/sample.png, this indicates a relative path from the main-file as specified in the manifest.yaml.

Example: when your index.html is in the ./src folder, you define in the manifest-file the following: main: ./src/index.html. Using a path like ~/images/sample.png will search for the specified image in the folder ./src/images/. This is also automatically done using the GeoApps CLI.