This is the quickstart to development guide. If you are looking for a quickstart guide for running GeoMoose then you should look at installing one of the GeoMoose examples. This quickstart utilizes the GeoMoose docker image for serving the demo data and MapServer.
- Git
- Docker or MapServer 7.0+ or Newer
- NodeJS with Npm v6.10.2 or Newer
GeoMoose contributions are done using Pull Requests. You can read more about pull requests on GitHub.
Click here to create your own Fork
This will download all the data necessary to get started.
cd ~
mkdir geomoose
cd geomoose
git clone [email protected]:[YOUR_USER_NAME]/gm3.git
git clone [email protected]:geomoose/gm3-demo-data.git
The Docker image is a quickstart way of setting up MapServer.
cd ~/geomoose/gm3-demo-data/docker
./build.sh
./run.sh
Next, test that the docker image is running correctly:
curl http://localhost:8000/cgi-bin/mapserv
If the message below appears then MapServer is running:
No query information to decode. QUERY_STRING is set, but empty.
This step installs all the dependencies for GeoMoose:
cd ~/geomoose/gm3
npm install
This will create the combined geomoose.js
file.
grunt build
To configure the example application, it needs to know where MapServer and the Mapfiles are on the server.
Add the following to ~/geomoose/gm3/examples/desktop/config.js
:
CONFIG = {
mapserver_url: '/mapserver/cgi-bin/mapserv',
mapfile_root: '/data/'
};
Fun fact! This is the same contents as ~/geomoose/gm3/examples/config.js.example
, so you could also cp ../config.js.example config.js
.
Then, let's see that all of the tests are working:
npm test
If the test are working then let's open up GeoMoose!
grunt serve
Open GeoMoose in a browser: http://localhost:4000/examples/desktop/debug.html