Select Page

An example of how to create a button that will perform a geospatial analysis calculation.

When you created your instance of an eRAMS virtual machine, a new project was created. These files are contained in a directory called roundtrip/<your project name>. Inside are three subdirectories: html, javascript, and python.

If we go with mercurial:

The roundtrip directory is also a mercurial repository that will serve as your workspace. Create your workspace by cloning the repository using the command that was provided when you created your erams instance. Windows users should install the latest version of tortoisehg if you don’t already have mercurial installed.

If we go with samba:

Your workspace can be mapped using map network drive in windows explorer:

Map Roundtrip Share

Your virtual machine will detect when a file has been changed and update accordingly.

If we go with zip and upload:

To update your erams virtual machine with your project’s changes, zip the directory and click the Upload Project button in your project’s web page. Note that the upload button will only appear if you are logged in.

HTML
Substitute the following in your new project’s HTML file. New code starts on line 33.

Javascript
Substitute the following in your new project’s javascript file.

Add to your new project’s _model.js code:

Add to your new project’s _view.js code:

Add to your new project’s python code: