Git Product home page Git Product logo

ngeo's Introduction

ngeo

ngeo is a JS library that aims to ease the development of applications based on AngularJS and OpenLayers.

More specifically, ngeo is a collection of AngularJS Components and Services useful for developing applications combining AngularJS and OpenLayers.

ngeo uses webpack: webpack gives you the possibility to use easily only the specific part of JavaScript, css and html that you need for your application.

If you use ngeo we recommend that you also use webpack, because this is the way we design and use ngeo at Camptocamp. But using webpack is not strictly mandatory: standalone builds of ngeo can be created.

To know more about ngeo take a look at:

  • The examples
  • The Storybook
  • The documentation can be found in each file. There is currently no API web-documentation for this version (you may also use API documentation).

ngeo also includes a contribs directory where non-core contributions may be placed. ngeo currently includes one contrib: gmf. That contrib includes components specific to the GeoMapFish project, that is components that rely on GeoMapFish-specific web services. The gmf contrib examples are also available online.

Requirements

  • make – GNU Make.
  • node – nodejs JS runtime environment.
  • npm – npm package manager.

Go further

Other docs related to ngeo:

Contributing

Install the pre-commit hooks:

pip install pre-commit
pre-commit install --allow-missing-config

ngeo's People

Contributors

adube avatar apastuhov avatar arnaud-morvan avatar asaunier avatar blattmann avatar dependabot-preview[bot] avatar dependabot[bot] avatar elemoine avatar fgravin avatar fredj avatar gberaudo avatar ger-benjamin avatar greenkeeper[bot] avatar greenkeeperio-bot avatar jenselme avatar julsbreakdown avatar kalbermattenm avatar llienher avatar marionb avatar ochriste avatar oliviersemet avatar pfirpfel avatar renatamuellerc2c avatar renovate-bot avatar renovate[bot] avatar requires avatar rmichaelis avatar sbrunner avatar vuilleumierc avatar ybolognini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ngeo's Issues

The sortable directive doesn't work on touch devices

Probably because the jQuery UI Sortable plugin does not support touch devices/events.

See http://camptocamp.github.io/ngeo/master/layerorder.html.

In my dragdrop branch the ngeoSortable directive uses goog.fx.DragListGroup instead of relying on the jQuery UI plugin. And goog.fx.DragListGroup does support touch devices, although I still have preventDefault-related issues. See http://erilem.net/ngeo/dragdrop/layerorder.html for a version of the layerorder example based on that branch.

Directives with templates

We will eventually add directives with templates/partials to ngeo. This issue discusses implications and the infrastructure work required for that.

We will want to use templateUrl and separate HTML template files. Writing HTML strings in the JS code is indeed too error-prone, inconvenient, hard to read, and ugly.

We need templateUrl to work for various cases:

  • Examples in development mode,
  • Examples with ngeo.js (a.k.a. "hosted examples"),
  • Non-compiled apps using ngeo.js (this case is more or less the same as the previous one),
  • Apps compiled together with ngeo,
  • Unit tests.

For the standalone build, ngeo.js, we'll need to have the HTML strings in the ngeo.js build file. This requires a build task that generates an Angular template cache pre-populated with HTML template strings.

Compilation fails

The compilation fails currently:

ERR! compile .build/examples/all.js:2419: ERROR - Bad type annotation. Unknown type olx.view.FitGeometryOptions
ERR! compile       /** @type {olx.view.FitGeometryOptions} */ ({maxZoom: 16}));
ERR! compile                  ^
ERR! compile 
ERR! compile 
ERR! compile 1 error(s), 0 warning(s)
ERR! compile 
ERR! Process exited with non-zero status, see log for more detail: 1 

This related to change in ol3, where the fitExtent and fitGeometry functions were replaced by a fit function.

PR to come.

Add typeahead externs

I need to have typeahead externs in my project; should it be added there or in ngeo ?

Build is broken

The build is broken on Travis: https://travis-ci.org/camptocamp/ngeo/builds/65867203.

node buildtools/build.js buildtools/ngeo.json dist/ngeo.js

info ol Parsing dependencies

info ol Compiling 391 sources

ERR! compile /home/travis/build/camptocamp/ngeo/src/directives/search.js:71: ERROR - Bad type annotation. Unknown type jQuery.event

ERR! compile                * @param {jQuery.event} event Event.

ERR! compile                          ^

ERR! compile 

ERR! compile 

ERR! compile /home/travis/build/camptocamp/ngeo/src/directives/search.js:83: ERROR - Bad type annotation. Unknown type jQuery.event

ERR! compile                * @param {jQuery.event} event Event.

ERR! compile                          ^

ERR! compile 

ERR! compile /home/travis/build/camptocamp/ngeo/src/directives/search.js:95: ERROR - Bad type annotation. Unknown type jQuery.event

ERR! compile                * @param {jQuery.event} event Event.

ERR! compile                          ^

ERR! compile 

ERR! compile externs/ngeox.js:290: ERROR - Bad type annotation. Unknown type jQuery.event

ERR! compile  *   cursorchanged: (function(jQuery.event, Object,

ERR! compile                               ^

ERR! compile 

ERR! compile externs/ngeox.js:292: ERROR - Bad type annotation. Unknown type jQuery.event

ERR! compile  *   selected: (function(jQuery.event, Object,

ERR! compile                          ^

ERR! compile 

ERR! compile externs/ngeox.js:294: ERROR - Bad type annotation. Unknown type jQuery.event

ERR! compile  *   autocompleted: (function(jQuery.event, Object,

ERR! compile                               ^

ERR! compile 

ERR! compile externs/ngeox.js:314: ERROR - Bad type annotation. Unknown type jQuery.event

ERR! compile  * @type {function(jQuery.event, Object, TypeaheadDataset)|undefined}

ERR! compile                    ^

ERR! compile 

ERR! compile externs/ngeox.js:320: ERROR - Bad type annotation. Unknown type jQuery.event

ERR! compile  * @type {function(jQuery.event, Object, TypeaheadDataset)|undefined}

ERR! compile                    ^

ERR! compile 

ERR! compile externs/ngeox.js:326: ERROR - Bad type annotation. Unknown type jQuery.event

ERR! compile  * @type {function(jQuery.event, Object, TypeaheadDataset)|undefined}

ERR! compile                    ^

ERR! compile 

ERR! compile 9 error(s), 0 warning(s)

ERR! compile 

ERR! Process exited with non-zero status, see log for more detail: 9 

make: *** [dist/ngeo.js] Error 1

ngeoLayertreenode creates layer eagerly

Currently the ngeoLayertreenode eagerly creates the layer for the node. Instead, the layer could be created lazily, i.e. the first it is actually needed.

Compilation of ngeo examples fails with new CC version

@fredj merged an OpenLayers PR to use the newest versions of Closure Compiler and Closure Library. I just run rm -rf node_modules/openlayers && npm install && make check in ngeo and I get errors when compiling the examples code:

node buildtools/build.js buildtools/examples-all.json .build/examples/all.min.js
info ol Parsing dependencies
info ol Compiling 371 sources
ERR! compile .build/examples/all.js:27: ERROR - Closure dependency methods(goog.provide, goog.require, etc) must be called at file scope.
ERR! compile goog.provide('animation');
ERR! compile ^
ERR! compile 
ERR! compile .build/examples/all.js:92: ERROR - Closure dependency methods(goog.provide, goog.require, etc) must be called at file scope.
ERR! compile goog.provide('control');
ERR! compile ^
ERR! compile 
ERR! compile 
ERR! compile .build/examples/all.js:142: ERROR - Closure dependency methods(goog.provide, goog.require, etc) must be called at file scope.
ERR! compile goog.provide('geolocation');
ERR! compile ^
ERR! compile 
ERR! compile .build/examples/all.js:209: ERROR - Closure dependency methods(goog.provide, goog.require, etc) must be called at file scope.
ERR! compile goog.provide('interactionbtngroup');
ERR! compile ^
ERR! compile 
ERR! compile .build/examples/all.js:305: ERROR - Closure dependency methods(goog.provide, goog.require, etc) must be called at file scope.
ERR! compile goog.provide('interactiontoggle');
ERR! compile ^
ERR! compile 
ERR! compile .build/examples/all.js:366: ERROR - Closure dependency methods(goog.provide, goog.require, etc) must be called at file scope.
ERR! compile goog.provide('layercatalog');
ERR! compile ^
ERR! compile 
ERR! compile .build/examples/all.js:524: ERROR - Closure dependency methods(goog.provide, goog.require, etc) must be called at file scope.
ERR! compile goog.provide('layermanager');
ERR! compile ^
ERR! compile 
ERR! compile .build/examples/all.js:662: ERROR - Closure dependency methods(goog.provide, goog.require, etc) must be called at file scope.
ERR! compile goog.provide('layeropacity');
ERR! compile ^
ERR! compile 
ERR! compile .build/examples/all.js:703: ERROR - Closure dependency methods(goog.provide, goog.require, etc) must be called at file scope.
ERR! compile goog.provide('layervisibility');
ERR! compile ^
ERR! compile 
ERR! compile .build/examples/all.js:755: ERROR - Closure dependency methods(goog.provide, goog.require, etc) must be called at file scope.
ERR! compile goog.provide('permalink');
ERR! compile ^
ERR! compile 
ERR! compile .build/examples/all.js:862: ERROR - Closure dependency methods(goog.provide, goog.require, etc) must be called at file scope.
ERR! compile goog.provide('simple');
ERR! compile ^
ERR! compile 
ERR! compile 11 error(s), 0 warning(s)
ERR! compile 
ERR! Process exited with non-zero status, see log for more detail: 11 
make: *** [.build/examples/all.min.js] Error 1

ngeoDecorate*: two way binding ?

For now, the ngeoDecorate* services offer a one way binding (angular to ol3).
Is it planned to have a two way binding (ol3 to angular) ?

dependencies versus devDependencies

In package.json we define dependencies and devDependencies. I think we need to be clearer on what needs to be a dependency and what needs to be a dev dependency.

For example, d3.js and typeahead.js are currently devDependencies while ngeo includes directives that depend on these librairies. So we may want to change them to regular dependencies.

Compile the examples all at once

Currently we compile each example individually. Although this sort of works for now this will quickly get very painful because of the compilation time. Instead we should combine the examples into a single file and compile that combined file.

Compilation issue related to angular-1.4.js externs file

The compilation currently fails with this error:

ode buildtools/build.js buildtools/ngeo.json dist/ngeo.js
info ol Parsing dependencies
info ol Compiling 395 sources
ERR! compile .build/externs/angular-1.4.js:2234: ERROR - Bad type annotation. missing closing )
ERR! compile  * @typedef {function(Function, number=, boolean=, ...*=):!angular.$q.Promise}
ERR! compile                                                        ^
ERR! compile 
ERR! compile 
ERR! compile 1 error(s), 0 warning(s)
ERR! compile 
ERR! Process exited with non-zero status, see log for more detail: 1 
make: *** [dist/ngeo.js] Error 1

Double modules in ngeo

I saw that we have "two modules per module" in the object "ngeo" Once (empty object) with a capitalize first letter. Once without it. Was that intentional ?

double_object_issues

Examples don't reload automatically

Socket warnings in javascript console.

Uncaught TypeError: Cannot set property 'version' of undefined socket.io.js:28object.module.io socket.io.js:28(anonymous function) socket.io.js:107(anonymous function)

Travis build is broken

The Travis build is broken because of changes to ol3.

The error is:

node buildtools/build.js buildtools/ngeo.json dist/ngeo.js
info ol Parsing dependencies
ERR! Unsatisfied dependency "ol.ext.rbush" in script: /home/travis/build/elemoine/ngeo/node_modules/openlayers/src/ol/structs/rbush.js
make: *** [dist/ngeo.js] Error 1

ol.FeatureOverlay removal

ol.FeatureOverlay has been removed. ngeo uses ol.FeatureOverlay in examples and in the ol-ext measure interactions. Examples are not a problem, as we can just replace the feature overlay by a vector layer in each example. For the ol-ext measure interactions we may want to use the immeditate API instead of using an "unmanaged" vector layer.

Change ngeoLayercatalog to ngeoLayertree

I wonder whether the "ngeoLayercatalog" directive should be renamed "ngeoLayertree". What the directive creates is a tree. "catalog" is an application-specific term describing how the tree is used in the application.

How to run the examples?

From a fresh clone of ngeo, I run make check serve then open http://localhost:3000/examples/measure.html.

An alert box pops up with the following content:
Main script not in manager paths: /home/gberaudo/dev/ngeo/measure.js.

This error message comes from closure-util.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.