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,7 +11,7 @@ var http = require('http'); | ||
11 | // /** | 11 | // /** |
12 | // * Production verification | 12 | // * Production verification |
13 | // */ | 13 | // */ |
14 | - | 14 | +// var express = require("express"); |
15 | // if (process.env.NODE_ENV === 'production') { | 15 | // if (process.env.NODE_ENV === 'production') { |
16 | // // Express will serve up production assets | 16 | // // Express will serve up production assets |
17 | // // like our main.js file, or main.css file! | 17 | // // like our main.js file, or main.css file! |
views/index.jade
@@ -2,4 +2,11 @@ extends layout | @@ -2,4 +2,11 @@ extends layout | ||
2 | 2 | ||
3 | block content | 3 | block content |
4 | h1= title | 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,10 +23,16 @@ block content | ||
23 | southWest = L.latLng(#{bndSW}), | 23 | southWest = L.latLng(#{bndSW}), |
24 | northEast = L.latLng(#{bndNE}), | 24 | northEast = L.latLng(#{bndNE}), |
25 | bounds = L.latLngBounds(southWest, northEast), | 25 | bounds = L.latLngBounds(southWest, northEast), |
26 | - osmAttrib = 'NEXUS', | 26 | + osmAttrib = '', |
27 | osm = L.tileLayer(osmUrl, | 27 | osm = L.tileLayer(osmUrl, |
28 | {attribution: osmAttrib}), | 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 | wmsLayer= L.tileLayer.wms("#{geoserverWMS}", { | 36 | wmsLayer= L.tileLayer.wms("#{geoserverWMS}", { |
31 | layers: "#{waterLayers}", | 37 | layers: "#{waterLayers}", |
32 | format: 'image/png', | 38 | format: 'image/png', |
@@ -34,7 +40,25 @@ block content | @@ -34,7 +40,25 @@ block content | ||
34 | maxZoom: 23 | 40 | maxZoom: 23 |
35 | }), | 41 | }), |
36 | drawnItems = L.featureGroup().addTo(map); | 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 | L.control.layers({ | 62 | L.control.layers({ |
39 | "OSM": osm.addTo(map), | 63 | "OSM": osm.addTo(map), |
40 | "Google": L.tileLayer('http://www.google.cn/maps/vt?lyrs=s@189&gl=cn&x={x}&y={y}&z={z}', { | 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,5 +69,6 @@ block content | ||
45 | { position: 'topright', collapsed: false } | 69 | { position: 'topright', collapsed: false } |
46 | ).addTo(map); | 70 | ).addTo(map); |
47 | 71 | ||
72 | + // places the marker that was found | ||
48 | var marker = L.marker([#{lat},#{lng}]).addTo(map); | 73 | var marker = L.marker([#{lat},#{lng}]).addTo(map); |
49 | marker.bindPopup("<b>#{codigo}</b><br>#{consumidor}").openPopup(); | 74 | marker.bindPopup("<b>#{codigo}</b><br>#{consumidor}").openPopup(); |
50 | \ No newline at end of file | 75 | \ No newline at end of file |