https://github.com/developmentseed/gl-director
GL Director, an interface to easily generate terrain flyovers for your app using Mapbox GL JS
https://github.com/developmentseed/gl-director
3d mapbox mapbox-gl-js terrain-rendering
Last synced: 10 months ago
JSON representation
GL Director, an interface to easily generate terrain flyovers for your app using Mapbox GL JS
- Host: GitHub
- URL: https://github.com/developmentseed/gl-director
- Owner: developmentseed
- License: mit
- Created: 2020-12-08T04:43:42.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-06-15T11:41:22.000Z (almost 3 years ago)
- Last Synced: 2024-04-10T03:11:35.956Z (about 2 years ago)
- Topics: 3d, mapbox, mapbox-gl-js, terrain-rendering
- Language: JavaScript
- Homepage: https://developmentseed.org/gl-director/
- Size: 40.8 MB
- Stars: 23
- Watchers: 8
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mapbox GL Director
An interface to easily generate terrain flyovers for your app using [Mapbox GL JS](https://github.com/mapbox/mapbox-gl-js/)

## Installation and Usage
The steps below will walk you through setting up your own instance of the project.
### Install Project Dependencies
To set up the development environment for this website, you'll need to install the following on your system:
- [Node](http://nodejs.org/) (see [.nvmrc](./.nvmrc)) (To manage multiple node versions we recommend [nvm](https://github.com/creationix/nvm))
- [Yarn](https://yarnpkg.com/) Package manager
### Install Application Dependencies
If you use [`nvm`](https://github.com/creationix/nvm), activate the desired Node version:
```
nvm install
```
Install Node modules:
```
yarn install
```
### Usage
#### Config files
All the config files can be found in `app/assets/scripts/config`.
After installing the projects there will be 3 main files:
- `local.js` - Used only for local development. On production this file should not exist or be empty.
- `staging.js`
- `production.js`
The `production.js` file serves as base and the other 2 will override it as needed:
- `staging.js` will be loaded whenever the env variable `DS_ENV` is set to staging.
- `local.js` will be loaded if it exists.
The following options must be set: (The used file will depend on the context):
- `value` - Description
Example:
```
module.exports = {
value: 'some-value'
};
```
#### Starting the app
```
yarn serve
```
Compiles the javascript and launches the server making the site available at `http://localhost:9000/`
The system will watch files and execute tasks whenever one of them changes.
The site will automatically refresh since it is bundled with livereload.
# Deployment
To prepare the app for deployment run:
```
yarn build
```
or
```
yarn stage
```
This will package the app and place all the contents in the `dist` directory.
The app can then be run by any web server.