Commit 573e5f5fe7b20ececa5ecde737be69fef976fc57
1 parent
faa2c5e7
Exists in
master
and in
1 other branch
V. 0.5.6 - Added logomark
Showing
3 changed files
with
37 additions
and
5 deletions
Show diff stats
bin/www
... | ... | @@ -11,7 +11,7 @@ var http = require('http'); |
11 | 11 | // /** |
12 | 12 | // * Production verification |
13 | 13 | // */ |
14 | - | |
14 | +// var express = require("express"); | |
15 | 15 | // if (process.env.NODE_ENV === 'production') { |
16 | 16 | // // Express will serve up production assets |
17 | 17 | // // like our main.js file, or main.css file! | ... | ... |
views/index.jade
... | ... | @@ -2,4 +2,11 @@ extends layout |
2 | 2 | |
3 | 3 | block content |
4 | 4 | h1= title |
5 | - p Welcome to #{title} | |
5 | + p Selecione aqui o link desejado: | |
6 | + a(href="/auth/google") Selecione aqui para logar | |
7 | + p | |
8 | + a(href="/map/paulo") Selecione aqui para acessar o mapa | |
9 | + p | |
10 | + a(href="/api/current_user") Selecione aqui para saber o usuário logado | |
11 | + p | |
12 | + a(href="/api/logout") Selecione aqui para fazer logout | ... | ... |
views/map.jade
... | ... | @@ -23,10 +23,16 @@ block content |
23 | 23 | southWest = L.latLng(#{bndSW}), |
24 | 24 | northEast = L.latLng(#{bndNE}), |
25 | 25 | bounds = L.latLngBounds(southWest, northEast), |
26 | - osmAttrib = 'NEXUS', | |
26 | + osmAttrib = '', | |
27 | 27 | osm = L.tileLayer(osmUrl, |
28 | 28 | {attribution: osmAttrib}), |
29 | - map = L.map('map', {center: new L.LatLng(#{lat},#{lng}), zoom: #{fator_zoom}, maxBounds: bounds}), | |
29 | + map = L.map('map', { | |
30 | + center: new L.LatLng(#{lat},#{lng}), | |
31 | + zoom: #{fator_zoom}, | |
32 | + maxBounds: bounds | |
33 | + }); | |
34 | + | |
35 | + map.attributionControl.setPrefix(''); | |
30 | 36 | wmsLayer= L.tileLayer.wms("#{geoserverWMS}", { |
31 | 37 | layers: "#{waterLayers}", |
32 | 38 | format: 'image/png', |
... | ... | @@ -34,7 +40,25 @@ block content |
34 | 40 | maxZoom: 23 |
35 | 41 | }), |
36 | 42 | drawnItems = L.featureGroup().addTo(map); |
37 | - | |
43 | + | |
44 | + // places the logomark | |
45 | + L.Control.Watermark = L.Control.extend({ | |
46 | + onAdd: function(map) { | |
47 | + var img = L.DomUtil.create('img'); | |
48 | + img.src = 'https://nexusbr.com/images/logo.png'; | |
49 | + img.style.width = '130px'; | |
50 | + return img; | |
51 | + }, | |
52 | + onRemove: function(map) { | |
53 | + // Nothing to do here | |
54 | + } | |
55 | + }); | |
56 | + L.control.watermark = function(opts) { | |
57 | + return new L.Control.Watermark(opts); | |
58 | + } | |
59 | + L.control.watermark({ position: 'bottomright' }).addTo(map); | |
60 | + | |
61 | + // places the layer control to on and off | |
38 | 62 | L.control.layers({ |
39 | 63 | "OSM": osm.addTo(map), |
40 | 64 | "Google": L.tileLayer('http://www.google.cn/maps/vt?lyrs=s@189&gl=cn&x={x}&y={y}&z={z}', { |
... | ... | @@ -45,5 +69,6 @@ block content |
45 | 69 | { position: 'topright', collapsed: false } |
46 | 70 | ).addTo(map); |
47 | 71 | |
72 | + // places the marker that was found | |
48 | 73 | var marker = L.marker([#{lat},#{lng}]).addTo(map); |
49 | 74 | marker.bindPopup("<b>#{codigo}</b><br>#{consumidor}").openPopup(); |
50 | 75 | \ No newline at end of file | ... | ... |