avec-geojs-web

0.0.1 • Public • Published

AveC-GeoJs, a suite for geocomputation.

The AveC-GeoJs-web library extends the AveC-GeoJs geospatial library with code usable in a web browser. Most notably, GeoJs-web includes a MapPane which can be used to visualize and interact with a Geojs.map.MapModel.

WARNING: this is alpha code, just barely working.

Library Organization

.hgignore   Configuration file for Mercurial. (Absent in npm install.)

.jshintrc   Configuration file for 'jshint'. JsHint, when run, generates
            some errors which are tolerated by this project.

.npmignore  Configuration for 'npm' to ignore files in the directory.

Makefile    A build file using the 'make' command.

RELEASE_CHECKLIST  Steps to follow for a release. (Absent in npm install.)

Readme.md   This file

.hg         The distributed source code management database containing the
            entire history of the GeoJs-web code library. (Absent in a 
            npm install.)

bin/        Executable binaries which are useful in the development of the 
            library source code. Many of these files are
            shell script utilities some of which invoke node.js to do their
            work.

design/     Resources for graphical design, mostly SVG files for Inkscape.

doc/        Documentation in HTML format (see index.html).

src/        The source code, organized mostly on the geospatial standards on
            which the AveC library is based. See the file avec/src/00_README
            for details.

test/       The 'AeoGapp' test webapp

zout_build/ TEMPORARY, generated during the build, e.g. by 'make build'

zout_test/  TEMPORARY, generated during testing, e.g. by 'make testweb'

Authors

The AveC Project (AveC)

Installation

AveC-GeoJs-web can be installed through the npm module system.

    npm install avec-geojs-web

Usage

AveC-GeoJs-web uses advanced features of ECMAscrpit 5 and features proposed for ECMAscript 6 so that a recent, modern web browser is required.

GeoJs-web can be included as a CommonJs module (i.e. require('avec-geojs-web')) or can be bundled into a standalone library with:

    cd $PROJECT_DIR
    npm install avec-geojs-web
    make -f node_modules/avec-geojs-web/Makefile build

which wil make a bundle in $PROJECT_DIR/node_modules/avec-geojs-web/zout_build/geojs-web.js. A similar command build-debug can be used to create an unminimized version for development.

The GeoJs-web MapPane can be included in a web page with the following structure:

    <section id="core">
        <div id="plot">
            <canvas>
            </canvas>
        </div>
    </section>

by defining, in Javascript, a GeoJs-web MapPane and linking it to the canvas:

    const canvas       = document.querySelector("#plot canvas");
    const mapviewmodel = { 'mapmodel': mymapmodel
                          ,'mapview':  mymapview};
    const mappane      = new GeoJs.web.MapPane(canvas, mapviewmodel, mappane_options );

although this requires correctly defining a valid MapModel, MapView, and MapPane options. In the future, extensive documentation will be provided explaining the MapModel, MapView, and MapPane options; for now, the example application defined in the test/webapp directory provides the best example.

A test REPL shell is also available. To run a test shell, do:

    make run

or, by hand, do:

    node --harmony
    const GeoJs = require('avec-geojs-web');
    GeoJs

where the last command will generate an overview of the library. Note that since GeoJs-web is targeted at the execution environment in a web browser, this shell is primarily of use for developers or testing an installation.

Testing

The test application test/webapp/app.html can be opened directly in a modern browser, and can be run on a Firefox OS device.

For testing purposes, the test application can be bundled into an APK bundle with make testapk and then installed on an Android device with adb install /path/to/avec-geojs-web-dir/zout_test/aeogapp.apk. Note that this is fragile, and the install will fail if the application already exists on the device.

Example

The test app provides the only working example until the documentation has been completed.

Known Issues

  • 2014.08 MapGraphicChart clipping disabled

    clipping image tiles fails in many browsers, enable with GeoJs.map.model.MapGraphicChart.clip = true;

Developers

Fork the code and hack on. If you can read this file, you have access to the source code.

Contribute

If you want to pitch in and contribute to the project, contact the authors. No proceedure has yet been created to accept outside contributions into the code base.

Contributors

 project  : avec-geojs-web
 repo age : 2 months
 active   : 2 months
 commits  : 24
 files    : 40
 authors  : 
     1	Adrian Custer         100.0%

UnLicense

The AveC-GeoJs library is distributed under the Latuff Anarchist Statement, which grants recipients no legal rights but encourages all to assert their extra-legal, moral right to collaborate in the goal of furthering humanity. All Javascript code files in the library should include the statement:

//    Steal this Code!
//      This code is not licensed; to use it, you must steal it.

Copyright (c) 2012-2014 The AveC Project

Package Sidebar

Install

npm i avec-geojs-web

Weekly Downloads

1

Version

0.0.1

License

none

Last publish

Collaborators

  • acuster