PageSourceSearch

https://findmylandlord.netlify.app/assets/js/constants.js

js findmylandlord.netlify.app collected 2026-10-03 10:44:13 UTC 3,854 bytes, 110 lines download raw bytes

1// Column headers
2var propertyAddressColumn = "Adresse";
3var communityAreaColumn = "Arrondissement";
4var propertyIndexColumn = "hash";
5var taxpayerColumn = "Nom";
6var taxpayerMatchCodeColumn = "Taxpayer Match Code";
7var ownedColumn = "Properties Held by Taxpayer Match Code";
8var unitColumn = "Nombre de logements";
9var affiliatedWithColumn = "Affiliated With";
10var additionalDetailsColumn = "Additional Details";
11var relativeSizeColumn = "Nombre de logements";
12
13// Database reference
14var databaseCollectionName = "features";
15// JSON search
16var searchIndexUrl = "assets/js/search-index.json";
17// Map tiles
18var tiles = `${window.location.origin}/features/{z}/{x}/{y}.pbf`;
19
20var githubRepoUrl = "https://github.com/northamerican/find-my-landlord"
21var supportEmail = "[email protected]";
22
23// Mapbox key
24mapboxgl.accessToken = "pk.eyJ1Ijoibm9ydGhhbWVyaWNhbiIsImEiOiJja2V5bWU4aGkwYXlzMnJxY2tteHY5aHg5In0.icsJb73KMz8GEPuuIbY2YA";
25
26// Colors
27var dsaRed = "#ec1f27";
28var dsaYellow = "#fad434";
29var color4 = dsaRed;
30var color3 = "#dc7270";
31var color2 = "#866b85";
32var color1 = "#1e1231";
33var black = "#000";
34var white = "#fff";
35var gray = "#808080";
36
37// Map defaults
38var defaultOpacity = .5;
39var highlightZoom = 14;
40
41// Change colors based on landlord size
42var defaultColors = [
43	"case",
44	[">=", ["get", ownedColumn], 50],
45	color4,
46	[">=", ["get", ownedColumn], 10],
47	color3,
48	[">=", ["get", ownedColumn], 3],
49	color2,
50	[">", ["get", ownedColumn], 0],
51	color1,
52	white
53];
54
55// Read limit on firestore requests
56var firestoreReadLimit = 200;
57
58// Scale radius based on zoom, relative unit size, hover
59var defaultRadius = [
60	"interpolate",
61	["exponential", 1.75],
62	["zoom"],
63	8, 
64	["case",
65		["boolean", ["feature-state", "hover"], false],
66		["interpolate", ["linear"], ["get", relativeSizeColumn], 0, 10, 100, 20],
67		["interpolate", ["linear"], ["get", relativeSizeColumn], 0, 2, 100, 10]
68	],
69	16, 
70	["case",
71		["boolean", ["feature-state", "hover"], false],
72		["interpolate", ["linear"], ["get", relativeSizeColumn], 0, 12, 100, 24],
73		["interpolate", ["linear"], ["get", relativeSizeColumn], 0, 4, 100, 20]
74	],
75	22, ["case",
76		["boolean", ["feature-state", "hover"], false],
77		["interpolate", ["linear"], ["get", relativeSizeColumn], 0, 200, 100, 400],
78		["interpolate", ["linear"], ["get", relativeSizeColumn], 0, 180, 100, 900]
79	]
80];
81
82// Custom UI
83var selectedBounds = null;
84var markerContainer = null;
85var marker = null;
86var spinner = document.getElementById("spinner");
87var searchInputContainer = document.getElementById("search-input-container");
88var searchInput = document.getElementById("search-input");
89var searchButton = document.getElementById("search-button");
90var clearButton = document.getElementById("clear");
91var searchResultsContainer = document.getElementById("search-results-container");
92var searchResultsCounter = document.getElementById("search-results-counter");
93var searchResultsList = document.getElementById("search-results-list");
94var selectedContainer = document.getElementById("selected-container");
95
96var ownedValue = document.getElementById("owned-value");
97var viewOnMap = document.getElementById("view-on-map");
98
99var appTitle = document.getElementById("app-title");
100var datedWarning = document.getElementById("dated-warning");
101var getHelpLinks = document.getElementById("get-help-links");
102var legalNoticeLink = document.getElementById("legal-notice");
103
104const affiliatedLabel = document.getElementById("affiliated-label");
105const ownedLabel = document.getElementById("owned-label");
106const taxpayerLabel = document.getElementById("taxpayer-label");
107const unitsLabel = document.getElementById("units-label");
108const dataInfoLink = document.getElementById("data-info-link");
109const additionalDetailsLink = document.getElementById("additional-details-link");
110const switchLangLink = document.getElementById("switch-lang-link");

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.