Aqui vai estar o código para a API Gisplay v2. Esta versão conterá alguns melhoramentos da API anterior e será adicionada a componente temporal à mesma.
Instalação
- Instalar node.js
- Após esta instalação fazer clone deste projeto com o git:
git clone https://rr_alves@bitbucket.org/Gisplay_Team/gisplayv2.git
- Navegar para a pasta do projeto (
cd gisplayv2
) - Executar os seguintes comandos por esta ordem:
npm i
npm start
- Abrir o ficheiro index.html da pasta dist num browser atualizado(Opera, Chrome, Firefox).
OU
- Instalar node.js
Executar o seguinte comando
Windows:
git clone https://rr_alves@bitbucket.org/Gisplay_Team/gisplayv2.git; cd ./gisplayv2/ES6; npm i; npm start
OSX?/Linux:
git clone https://rr_alves@bitbucket.org/Gisplay_Team/gisplayv2.git && cd ./gisplayv2/ES6 && npm i && npm start
Abrir o ficheiro index.html da pasta dist num browser atualizado(Opera, Chrome, Firefox).
Demos
Demos podem ser vistos em: Rui Alves GitHub Online page.
Estes serão atualizados automaticamente quando for corrido o comando
> node shell.js
Fases
- Modificar API corrente de modo a resolver problemas pertinentes. 06/03 - 03/04 (Ver abaixo)
- Reformulação da API tendo em conta a componente temporal
- Implementação.
- Avaliação comparativa.
- Escrita do documento final.
O que tiver sido feito em cada fase aparecerá a riscado
Fase 1 (Corrente) 06/03 - 03/04
- Acabar estudo WebGL.
- Documentar métodos e classes da API anterior com JSDoc.
- Testes à versão atual.
- Seleção de áreas e popup associado.
- Seleção de ponto ou conjunto de pontos e popup associado.
- Mudança do uso da cor.
- Adicionar formato de dados CSV.
- Adicionar outros fornecedores de Mapas de fundo.
- Possibilidade de adicionar múltiplas projeções.
- Heat Map
Tarefa | Planeamento | Feito (❌ ou ✅ ) |
---|---|---|
1 |
14/03 - 15/05 | ❌ |
2 |
16/03 | ❌ |
3 |
17/03 | ❌ |
4 |
18/03 | ❌ |
5 |
19/03 - 20/03 | ❌ |
6 |
21/03 | ❌ |
7 |
22/03 - 23/03 | ❌ |
8 |
24/03 - 25/03 | ❌ |
9 |
26/03 - 29/03 | ❌ |
10 |
30/03 - 03/04 | ❌ |
Fase 2(Futura)
Tools Used
Nome | Uso | URLs |
---|---|---|
1.webpack2 |
Bundle de todo o código. | webpack.js + github |
2.shelljs |
Executar comandos nativos c/ JS | shelljs.org + github |
3.VSCode |
IDE utilizado | vscode + extensions |
4.Mocha Ou Karma |
Test JS code | mochajs + Karma ? |
5.Chrome Profiler for GPU and CPU |
Profiling code | GPU Memory Tracing Chromium |
6.ESDoc |
Document Code | ESDoc + GitHub |
1.webpack2
Fazer bundling do codigo e passar de ES2015 para o browser(criando um único ficheiro gisplayv2.bundle.js)
babel-loader - Load files ES2015 e transformar para o browser.
mocha-webpack - Unit Test (Not used atm)
Testing with webpack2 - Como correr Unit Tests no webpack2.
2. shelljs
Automaticamente correr comandos para fazer commit para o repositório github dos Demos
Basicamente permite executar comandos nativos (e.g., ls, dir, rm) em qualquer SO(Windows, Linux, OSX) através de javascript.
No caso deste repositório, no ficheiro shell.js é possível ver que este faz a cópia do ficheiro index.html e do ficheiro gisplayv2.bundle.js para a pasta do repositório github pages que criei. Depois faz commit e push para esse mesmo repositorio online.
Usando o github pages permite aceder online aos demos que forem sendo criados (O link está na pagina mãe deste repositorio).
3. VSCode IDE
Bom IDE para JS, TS. Particularmente linguagens web funciona muito bem.
Debbuger for Chrome - Debug your JavaScript code in the Chrome browser, or any other target that supports the Chrome Debugger protocol.
open in browser - Open index.html file in any installed browser.
Complete JSDoc Tags - Autocomplete JSDoc Tags.
4. Testing
Mocha provavelmente.
5. Profiling
- Chrome DevTools: JavaScript CPU Profiling in Chrome 58 2.MemoryInfra - Tool integrated in Chromium/Chrome/Opera
- GPU
6. Documentation
Usar ESDoc. Permite ainda usar Mocha para testes.
Ver resultado final ESDoc Test
Known Issues
- RTree not working due to call issue.
- Usar Leaflet Rtree
- Usar rbush
- Last case scenario build our own
TRASH ZONE(IGNORE)
Esta zona não interessa de momento.
- First, the API will be ported to ES6 or Typescript and an workflow will be added, something like webpack to automatically reload on changes, saving time later on.
- After that some things will be changed like the use of color, allow the use of multiple projections, CSV data format and implementation of Heat Map.
- Reformulation of the API to deal with the temporal component.
- Implementation of 3.
- Benchmarking between Temporal Gisplay and other APIs (Leaflet, MapMap).
If Typescript is used then the output can be either ES5 or ES6 allowing any future improvement upon this API to be done in Typescript or in any of those previously mentioned (ES5 or ES6).
Possible problems:
To use Typescript one must install:
- nodejs
- typescript
Some browsers may not fully support ES6 but the convertion is easy to do with babel.