24 lines
No EOL
944 B
JavaScript
24 lines
No EOL
944 B
JavaScript
const sqlite3 = require('sqlite3').verbose();
|
|
const dbPath = '../database.sqlite';
|
|
const db = new sqlite3.Database(dbPath, (err) => {
|
|
if (err) {
|
|
console.error(err.message);
|
|
}
|
|
console.log('Connected to the SQLite database.');
|
|
});
|
|
|
|
import L from 'leaflet';
|
|
|
|
const key = 'YOUR_MAPTILER_API_KEY_HERE';
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const map = L.map('search-map').setView([49.2125578, 16.62662018], 14);
|
|
L.tileLayer(`https://api.maptiler.com/maps/streets-v2/{z}/{x}/{y}.png?key=${key}`, {
|
|
tileSize: 512,
|
|
zoomOffset: -1,
|
|
minZoom: 1,
|
|
attribution: "\u003ca href=\"https://www.maptiler.com/copyright/\" target=\"_blank\"\u003e\u0026copy; MapTiler\u003c/a\u003e \u003ca href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\"\u003e\u0026copy; OpenStreetMap contributors\u003c/a\u003e",
|
|
crossOrigin: true
|
|
}).addTo(map);
|
|
});
|
|
|
|
alert("connard"); |