Commit dcc1476d8c4f2018a80ebab487f2a6937e708214
1 parent
594fec5f
Exists in
master
and in
1 other branch
V. 0.7.0 - Integração do mapa com a procura rápida. Não está localizando com a seleção ainda.
Showing
9 changed files
with
36 additions
and
42 deletions
Show diff stats
client/package-lock.json
1 | 1 | { |
2 | 2 | "name": "client", |
3 | - "version": "0.1.0", | |
3 | + "version": "0.6.2", | |
4 | 4 | "lockfileVersion": 1, |
5 | 5 | "requires": true, |
6 | 6 | "dependencies": { |
... | ... | @@ -8889,6 +8889,11 @@ |
8889 | 8889 | "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-4.0.0.tgz", |
8890 | 8890 | "integrity": "sha512-FlsPxavEyMuR6TjVbSSywovXSEyOg6ZDj5+Z8nbsRl9EkOzAhEIcS+GLoQDC5fz/t9suhUXWmUrOBrgeUvrMxw==" |
8891 | 8891 | }, |
8892 | + "react-iframe": { | |
8893 | + "version": "1.2.0", | |
8894 | + "resolved": "https://registry.npmjs.org/react-iframe/-/react-iframe-1.2.0.tgz", | |
8895 | + "integrity": "sha512-xd7zHdVu6Pe3ijQNkT8PvLfGRQEY/CuKvjMhVC+OLSoXL1mkBA300hen5vm56yNdaUt3AspVclXda1IO7ooMhg==" | |
8896 | + }, | |
8892 | 8897 | "react-input-autosize": { |
8893 | 8898 | "version": "2.2.1", |
8894 | 8899 | "resolved": "https://registry.npmjs.org/react-input-autosize/-/react-input-autosize-2.2.1.tgz", | ... | ... |
client/package.json
1 | 1 | { |
2 | 2 | "name": "client", |
3 | - "version": "0.6.2", | |
3 | + "version": "0.7.0", | |
4 | 4 | "private": true, |
5 | 5 | "proxy": { |
6 | 6 | "/map": { |
... | ... | @@ -30,12 +30,13 @@ |
30 | 30 | }, |
31 | 31 | "dependencies": { |
32 | 32 | "ajv": "^6.5.0", |
33 | + "axios": "0.17.1", | |
33 | 34 | "faker": "^4.1.0", |
34 | 35 | "react": "^16.4.0", |
35 | 36 | "react-dom": "^16.4.0", |
37 | + "react-iframe": "^1.2.0", | |
36 | 38 | "react-scripts": "1.1.4", |
37 | 39 | "react-select": "1.1.0", |
38 | - "axios": "0.17.1", | |
39 | 40 | "util": "^0.10.3" |
40 | 41 | }, |
41 | 42 | "scripts": { | ... | ... |
client/public/index.html
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 | work correctly both with client-side routing and a non-root public URL. |
20 | 20 | Learn how to configure a non-root public URL by running `npm run build`. |
21 | 21 | --> |
22 | - <title>NEXUS Título</title> | |
22 | + <title>NEXUS</title> | |
23 | 23 | </head> |
24 | 24 | <body> |
25 | 25 | <noscript> | ... | ... |
client/src/App.js
1 | 1 | import React, { Component } from "react"; |
2 | -import logo from "./logo.svg"; | |
3 | 2 | import "./App.css"; |
4 | 3 | import FindConsumer from "./components/findConsumer"; |
4 | +import Map from "./components/map"; | |
5 | 5 | |
6 | 6 | class App extends Component { |
7 | 7 | render() { |
8 | 8 | return ( |
9 | 9 | <div className="App"> |
10 | - <header className="App-header"> | |
11 | - <img src={logo} className="App-logo" alt="logo" /> | |
12 | - <h1 className="App-title">NEXUS Início da aplicação</h1> | |
13 | - </header> | |
14 | - <p className="App-intro"> | |
15 | - Digite o nome ou número de ligação de água abaixo | |
16 | - </p> | |
17 | - <p /> | |
18 | - | |
19 | 10 | <div> |
20 | 11 | <FindConsumer /> |
21 | 12 | </div> |
22 | - <p /> | |
23 | - <p> Selecione aqui o link desejado 2: </p> | |
24 | - <a href="/auth/google">Selecione aqui para logar</a> | |
25 | - <p /> | |
26 | - <a href="/map/paulo">Selecione aqui para acessar o mapa</a> | |
27 | - <p /> | |
28 | - <a href="/api/current_user"> | |
29 | - Selecione aqui para saber o usuário logado | |
30 | - </a> | |
31 | - <p /> | |
32 | - <a href="/api/logout">Selecione aqui para fazer logout</a> | |
33 | - <p /> | |
34 | - <a href="/consumidores">Mostra todos consumidores de água</a> | |
13 | + <div> | |
14 | + <Map /> | |
15 | + </div> | |
35 | 16 | </div> |
36 | 17 | ); |
37 | 18 | } | ... | ... |
... | ... | @@ -0,0 +1,20 @@ |
1 | +import React, { Component } from 'react'; | |
2 | +import Iframe from 'react-iframe'; | |
3 | +import 'react-select/dist/react-select.css'; | |
4 | + | |
5 | +export default class Map extends Component<*, State> { | |
6 | + constructor(props) { | |
7 | + super(props); | |
8 | + this.state = { | |
9 | + }; | |
10 | + | |
11 | + } | |
12 | + | |
13 | + render() { | |
14 | + return ( | |
15 | + <div> | |
16 | + <Iframe url="/map/pedro" position="absolute" width="100%" height="95%" id="mapId" allowFullScreen /> | |
17 | + </div> | |
18 | + ); | |
19 | + } | |
20 | +} | ... | ... |
package.json
public/stylesheets/style.css
views/index.jade
views/map.jade
1 | 1 | extends layout |
2 | 2 | block content |
3 | - br | |
4 | - .container | |
5 | - .row | |
6 | - .col.col-lg-3 | |
7 | - | #{consumidor} | |
8 | - .col.col-lg-2 | |
9 | - input.form-control(type='text', id="nome", placeholder='Digite o nome') | |
10 | - .col.col-lg-1 | |
11 | - input.btn.btn-primary(type='button', value='Procura', onclick=' relocate_home()') | |
12 | - | |
13 | 3 | script. |
14 | 4 | function relocate_home() |
15 | 5 | { |
16 | 6 | location.href = "/map/" + nome.value; |
17 | 7 | } |
18 | - br | |
19 | 8 | #map |
20 | - | |
21 | 9 | script(type='text/javascript'). |
22 | 10 | var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', |
23 | 11 | southWest = L.latLng(#{bndSW}), | ... | ... |