CanvasMap
Getting Started Tutorials 3D Reference

Architecuture of CanvasMap

Below are additional details on the design of CanvasMap.

Target Users

The target users for CanvasMap are developers of web sites that include spatial data. This assumes that the users have some working knowledge of HTML, CSS, JavaScript, and the DOM. Users should also have basic knowledge of using a GIS application such as QGIS or ArcMap.

The prioritized list of users is:

  1. Students learning to create web maps based on geospatial methods and data
  2. Students creating web sites for projects, including research
  3. Faculty creating web sites for research and final projects for sponsors
  4. Natural resource managers
  5. Any one else wanting to put spatial data on the web.

Goals

Strategies

Tactics

Design Issues

The design is stable and documented in the tutorials. Current design issues include:

Folder-Level Organization

Within the CanvasMap website, there are the following folders to organize CanvasMap files:

At the root of the CanvasMap website folder are:

Note that there are also two Java programs to build the BuildMini.bat file and to create the reference documentation from the JavaScript code.

File Naming

All javascript files in CanvasMap are precedded by "CM" to minitmize collisions with other libraries. "CM2" indicates a file that contains code specifically for 2D maps while "CM3" indicates code specifically for 3D maps. Files with just "CM" are general and used by both 2D and 3D maps.

The first name after "CMX" indicites the type of class contained by the file and typically the main base classes it is derived from (e.g. "CMDataset", "CMPanel"). This approach groups the classes that are related together for easy identification.

Finding Classes

One of the issue with any extensible architecture is how code finds appropriate classes for specific oeprations. An example would be how to populate a menu to add new items to a scene. Wihtin the CMDefs.js file is an array of the currently registered classes. Any new class can simplly add code to register additional classes. Then, other classes can call CMDefs to see which classes meet its needs.

CMDefs.RegisterClasses("CM3Camera",[
 { Name:"Perspective Camera",Class:"C3CameraPerspective"},
 { Name:"Orthographic Camera",Class:"CM3CameraOrthographic"},
 ]);