paulovieira / clima Goto Github PK
View Code? Open in Web Editor NEWclima - web app for clima-madeira
clima - web app for clima-madeira
"Warning: the shape has 276 geometries"
The cartoCss shows only a static property. It should be dynamic, like the code above (though the user can actually see the property to use in the code above)
select * from texts_update('[{
"id":3233,
"contents":{
"pt":"abc%;"}
}]')
TileMill
Dashboard
To create a new map the user should be in tilemill, not in the dashboard. The UI for that is already done. We just have to capture the click event on the button and instead of executing the original code, make a POST to /api/maps
The "web maps" section in the dashboard could be renamed to "map tools".
Steps:
in the original UI to create a new map, add 3 radio buttons: "madeira"
in the click event to create the map, make POST request to /api/maps
show to button to go to the new map (or find the code that invokes the router and use it)
in the listing of all maps, order by date of creation (the listing of all maps is now obtained with GET /api/maps)
show the user that created the maps
(detail) when a new is being edited, the dashboard should somehow know about it; when the user goes to "Map tools" -> Legends, the map that is being currently edited would be already selected
Every button in TileMill should have a native popup with more details about the action.
In the "This map doesn't have any shapes yet!" message, add a direct link to the map
There was some strange bug in joi which would make request.payload an empty array
Mantem-se o formato de 3 níveis.
No nível 2 (introdução do sector), usar o template das 3 colunas
(note: this has been done before!)
For the cirac shapes the process dies when loading the shape to the database.
The problem seems to happend when we call child_process's exec with shp2pgsql ... | psql ...
. Alternatives:
use 2 separate commands which don't involve streaming data
shp2pgsql > tem_output.sql
psql -f temp_output.sql
use other tool like ogr2ogr
This will have the basic grunt tasks for concatenating and minifying. On the server, we don't want to log to the console.
instead of using the range input, the user should just drag the maps
Para mais detalhes ver Plataforma/Indicadores de processo.docx
(no ftp)
Há dois tipos de indicadores: "indicadores de processo" e "indicadores de conteúdo":
É necessário criar uma página "Indicadores".
Definir um grupo e utilizadores para editar os indicadores ("observadores"). Estes utilizadores não podem editar o website nem os mapas.
This doesn't seem to be working (because of the audit script)
CREATE TABLE IF NOT EXISTS shapes(
id SERIAL PRIMARY KEY,
schema_name TEXT NOT NULL default 'geo',
table_name TEXT NOT NULL UNIQUE, -- the name of the file and the name of the shape might be slightly different
srid INT REFERENCES spatial_ref_sys(srid) default 4326,
geometry_type TEXT NOT NULL,
attributes_info JSONB default '[]',
description JSONB default '{}',
file_id INT references files(id) on update cascade on delete set null,
owner_id INT REFERENCES users(id) ON DELETE SET NULL,
created_at timestamptz not null default now(),
CONSTRAINT description_must_be_object CHECK (jsonb_typeof(description) = 'object')
);
-- change 15.07.13: add json column for the inspire metadata
DO $$
DECLARE
dummy INT;
BEGIN
BEGIN
ALTER TABLE shapes ADD COLUMN inspire JSONB default '{}';
EXCEPTION
WHEN duplicate_column THEN RAISE NOTICE 'column "inspire" already exists in "shapes", skipping';
END;
END;
$$;
Remove all references to auth being false. What we really mean now is to test directly if env is dev-no-auth, and is so, use the credentials objects in the configuration
For instance, to access the tilemill editor, the user should be admin
This might be useful to solve the problem of having default scripts in everypage, and specific scripts for specific pages.
The "sequential maps" (or "grouped maps") functionality should be in en extra tab in "map tools".
Objectives:
is this due to full screen it self? will it also work bad if there is no map at all?´
try to use the leaflet modal plugin present in in the leaflet website
try also alternative modal libs.
In http://clima.dev/pt/login
, If we click on the sectores menu, the menu does not open.
For the *_create
and *_update
functions, consider using json_array_elements
instead of json_populate_recordset
(see example below).
Advantages:
config
table, where some value are objects while others are simple stringshttp://www.postgresql.org/docs/9.4/static/functions-json.html
DO $$
DECLARE
input_array JSON;
input_obj JSON;
id INT;
name TEXT;
some_field JSON;
BEGIN
SELECT '[{"id": 1, "name": "paulo", "some_field": {"xyz": 123} }, {"id": 2, "name": "ana"}]' INTO input_array;
FOR input_obj IN (SELECT * from json_array_elements(input_array)) LOOP
-- extract only the keys that we are interested in
SELECT input_obj->'id' INTO id;
SELECT input_obj->'name' INTO name;
SELECT input_obj->'some_field' INTO some_field;
IF some_field IS NULL THEN
SELECT '{"default": "value"}'::json INTO some_field;
END IF;
RAISE NOTICE 'Input data: % % %', id, name, some_field;
END LOOP;
END;
$$
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.