The CanvasMap Editor
The CanvasMap editor provides a Graphical User Interface (GUI) to allow the creation of maps with little JavaScript. The editor is included as an extension with CanvasMap and also requires web services to access files on the server.
Folder Structure
A specific folder structure is required on the target server for the current editor. The code can be modified as needed to change this structure. Note that panoramic scenes are mentioned here even through they are not supported directly by CanvasMap.
- Map Folder
- Data
- Backups
- GISData
- BlueSprayPyramids - pyramid data from BlueSpray
- GeoJSON - Spatial vector data sets
- Rasters - Spatial raster data sets
- Images - Non-spatial images
- Maps - JSON map files exported from a CMMainContainer.
- Panos - images for creating panoramic scenes
- PanoTours - virtual tours using panoramic images
- Templates
- Templates for the navigation bar and footer
- WebServices
- Web services to access the file system. The provided files are coded in Python
- Data
For this structure to work correctly, the WebServices folder will have to have executable permissions and the GISData and Maps folders will have to have write permissions. It is critical that the WebService folder does not have write permissions or someone might be able to upload a script that is then executed. This would allow someone to penetrate the server through the Internet.
The CanvasMap folder(s) may be used directly from and HSU server but we prefer that you download the files and deploy them on your server. This will also prevent problems if we update CanvasMap. The same is true of the Spa libraries.
GUI
The GUI for the editor looks much like the regular CanvasMap web site. The differences is that a new menu bar has been added across the top and additional buttons are available on the panel on the left. The menu contains the following:
- Home
- Map
- Edit
- Editing - item to turn editing mode on and off
- New Map - create a new map
- Save Map - save the existing map to the server
- Save Map As - save the existing map with a new name to the server
- Add Layer - Add a new layer. This may be an empty layer or a layer from the files available on the server
- Add Background Layer - Add a new background layer. The options are available in the file:
- https://gsp.humboldt.edu/archive/CMStandardBackgrounds.js
- Save Dataset - Save any changes made to the dataset associated with the currently selected layer
- Upload Image File - upload a non-spatial image to the Images folder on the server
- Upload GeoJSON File - upload a vector data file to the GeoJSON folder on the server
- Login
- Register
Note: we will probably provide one "Upload" option with a select for different destinations in the future.
Security
Since this version of the editor does not require a database, the logins and passwords are stored in the web service file. Obviously, this file should not be able to be read over the Internet. If Python files are set to execute in the folder, this will prevent the files from being downloaded over the Internet. FTP and other file access protocols should not be enabled for this folder.
Buttons
The buttons on the left of the editor provide access to panels that allow the user to add and remove content from the object hierarchy, change object settings, and change attributes in dataset's. Additional panels are available for setting up categorical symbology on layers. We have also made it easy to add new panels to create custom GUIs for specific applications.
Layer List
The layer list now has a checkbox at the bottom labeled "Show All". When this is clicked, the entire object hierarchy can be accessed. Right clicking on objects items in the hierarchy provides access to many features including adding an removing objects, and zooming to objects.
Settings Editor
There are currently two settings editors. Both are visible by default as one provides access to all the settings in an object. WE are also working on a new settings editor that provides richer controls for changing settings but it does not yet provide access to all settings so both are available.
Note that to save changes to settings, you will need to select Save Map from the Edit menu.
Attribute Editor
The attribute editor allows you to change attribute values in a vector dataset. Just select the desired feature, open the attribute editor panel, change the desired settings, and then click off of any controls such as text boxes. The attributes will change.
Note: To save the changes, you will need to select Save Dataset from the Edit menu.