mirror of
https://github.com/catdevnull/preciazo.git
synced 2024-11-22 06:16:18 +00:00
parent
245dc2eb02
commit
9aff44b3d9
5 changed files with 1588 additions and 39 deletions
BIN
sepa/bun.lockb
BIN
sepa/bun.lockb
Binary file not shown.
|
@ -41,6 +41,7 @@
|
|||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@maplibre/maplibre-gl-leaflet": "^0.0.22",
|
||||
"@sentry/sveltekit": "^8.30.0",
|
||||
"@types/node": "^22.5.0",
|
||||
"bits-ui": "^0.21.13",
|
||||
|
@ -49,6 +50,7 @@
|
|||
"leaflet": "^1.9.4",
|
||||
"leaflet.markercluster": "^1.5.3",
|
||||
"lucide-svelte": "^0.441.0",
|
||||
"maplibre-gl": "^4.7.0",
|
||||
"postgres": "^3.4.4",
|
||||
"tailwind-merge": "^2.5.2",
|
||||
"tailwind-variants": "^0.2.1"
|
||||
|
|
|
@ -1,33 +1,41 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
|
||||
/>
|
||||
|
||||
<title>Preciazo</title>
|
||||
<meta name="description" content="Busca precios de productos en distintas cadenas de supermercados en Argentina." />
|
||||
<meta
|
||||
name="description"
|
||||
content="Busca precios de productos en distintas cadenas de supermercados en Argentina."
|
||||
/>
|
||||
<meta content="index, follow" name="robots" />
|
||||
<meta property="og:title" content="Preciazo" />
|
||||
<meta property="og:description"
|
||||
content="Busca precios de productos en distintas cadenas de supermercados en Argentina." />
|
||||
<meta
|
||||
property="og:description"
|
||||
content="Busca precios de productos en distintas cadenas de supermercados en Argentina."
|
||||
/>
|
||||
<meta property="og:image" content="https://preciazo.nulo.in/favicon.png" />
|
||||
<meta property="og:url" content={`https://preciazo.nulo.in${data.pathname}`} />
|
||||
<meta property="og:url" content="https://preciazo.nulo.in" />
|
||||
<meta property="og:type" content="website" />
|
||||
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:site" content="@esoesnulo" />
|
||||
<meta name="twitter:title" content="Preciazo" />
|
||||
<meta name="twitter:description"
|
||||
content="Busca precios de productos en distintas cadenas de supermercados en Argentina." />
|
||||
<meta
|
||||
name="twitter:description"
|
||||
content="Busca precios de productos en distintas cadenas de supermercados en Argentina."
|
||||
/>
|
||||
<meta name="twitter:image" content="https://preciazo.nulo.in/favicon.png" />
|
||||
|
||||
%sveltekit.head%
|
||||
</head>
|
||||
</head>
|
||||
|
||||
<body data-sveltekit-preload-data="hover">
|
||||
<body data-sveltekit-preload-data="hover">
|
||||
<div style="display: contents">%sveltekit.body%</div>
|
||||
</body>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,6 +1,7 @@
|
|||
<script lang="ts">
|
||||
import { onDestroy, onMount, tick } from 'svelte';
|
||||
import 'leaflet/dist/leaflet.css';
|
||||
import style from './map_style.json';
|
||||
import type L from 'leaflet';
|
||||
|
||||
let mapEl: HTMLDivElement;
|
||||
|
@ -8,27 +9,26 @@
|
|||
let map: L.Map | undefined;
|
||||
|
||||
onMount(async () => {
|
||||
const L = await import('leaflet');
|
||||
window.L = await import('leaflet');
|
||||
const L2 = await import('maplibre-gl');
|
||||
const L3 = await import('@maplibre/maplibre-gl-leaflet');
|
||||
// Set up initial map center and zoom level
|
||||
map = L.map(mapEl, {
|
||||
map = window.L.map(mapEl, {
|
||||
center: [-34.599722222222, -58.381944444444], // EDIT latitude, longitude to re-center map
|
||||
zoom: 9, // EDIT from 1 to 18 -- decrease to zoom out, increase to zoom in
|
||||
scrollWheelZoom: true // Changed to true to enable zoom with scrollwheel
|
||||
// tap: false
|
||||
});
|
||||
|
||||
/* Control panel to display map layers */
|
||||
// var controlLayers = L.control.layers( null, null, {
|
||||
// position: "topright",
|
||||
// collapsed: false
|
||||
// }).addTo(map);
|
||||
window.L.maplibreGL({
|
||||
style: style as any,
|
||||
attribution:
|
||||
'© <a href="https://stadiamaps.com/" target="_blank">Stadia Maps</a>, © <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a> © <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a>'
|
||||
} as any).addTo(map);
|
||||
|
||||
// display Carto basemap tiles with light features and labels
|
||||
L.tileLayer('https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png', {
|
||||
attribution:
|
||||
'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>, © <a href="https://carto.com/attribution">CARTO</a>'
|
||||
}).addTo(map);
|
||||
mapMap(map, L);
|
||||
// L.tileLayer.provider('Stadia.AlidadeSmoothBackground').addTo(map);
|
||||
mapMap(map, window.L);
|
||||
});
|
||||
|
||||
onDestroy(() => {
|
||||
|
|
1539
sepa/sitio2/src/lib/components/map_style.json
Normal file
1539
sepa/sitio2/src/lib/components/map_style.json
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue