mirror of
https://github.com/catdevnull/preciazo.git
synced 2024-11-22 14:16:19 +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",
|
"type": "module",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@maplibre/maplibre-gl-leaflet": "^0.0.22",
|
||||||
"@sentry/sveltekit": "^8.30.0",
|
"@sentry/sveltekit": "^8.30.0",
|
||||||
"@types/node": "^22.5.0",
|
"@types/node": "^22.5.0",
|
||||||
"bits-ui": "^0.21.13",
|
"bits-ui": "^0.21.13",
|
||||||
|
@ -49,6 +50,7 @@
|
||||||
"leaflet": "^1.9.4",
|
"leaflet": "^1.9.4",
|
||||||
"leaflet.markercluster": "^1.5.3",
|
"leaflet.markercluster": "^1.5.3",
|
||||||
"lucide-svelte": "^0.441.0",
|
"lucide-svelte": "^0.441.0",
|
||||||
|
"maplibre-gl": "^4.7.0",
|
||||||
"postgres": "^3.4.4",
|
"postgres": "^3.4.4",
|
||||||
"tailwind-merge": "^2.5.2",
|
"tailwind-merge": "^2.5.2",
|
||||||
"tailwind-variants": "^0.2.1"
|
"tailwind-variants": "^0.2.1"
|
||||||
|
|
|
@ -1,33 +1,41 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
<head>
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
<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>
|
<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 content="index, follow" name="robots" />
|
||||||
<meta property="og:title" content="Preciazo" />
|
<meta property="og:title" content="Preciazo" />
|
||||||
<meta property="og:description"
|
<meta
|
||||||
content="Busca precios de productos en distintas cadenas de supermercados en Argentina." />
|
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: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 property="og:type" content="website" />
|
||||||
|
|
||||||
<meta name="twitter:card" content="summary" />
|
<meta name="twitter:card" content="summary" />
|
||||||
<meta name="twitter:site" content="@esoesnulo" />
|
<meta name="twitter:site" content="@esoesnulo" />
|
||||||
<meta name="twitter:title" content="Preciazo" />
|
<meta name="twitter:title" content="Preciazo" />
|
||||||
<meta name="twitter:description"
|
<meta
|
||||||
content="Busca precios de productos en distintas cadenas de supermercados en Argentina." />
|
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" />
|
<meta name="twitter:image" content="https://preciazo.nulo.in/favicon.png" />
|
||||||
|
|
||||||
%sveltekit.head%
|
%sveltekit.head%
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body data-sveltekit-preload-data="hover">
|
<body data-sveltekit-preload-data="hover">
|
||||||
<div style="display: contents">%sveltekit.body%</div>
|
<div style="display: contents">%sveltekit.body%</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
|
@ -1,6 +1,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { onDestroy, onMount, tick } from 'svelte';
|
import { onDestroy, onMount, tick } from 'svelte';
|
||||||
import 'leaflet/dist/leaflet.css';
|
import 'leaflet/dist/leaflet.css';
|
||||||
|
import style from './map_style.json';
|
||||||
import type L from 'leaflet';
|
import type L from 'leaflet';
|
||||||
|
|
||||||
let mapEl: HTMLDivElement;
|
let mapEl: HTMLDivElement;
|
||||||
|
@ -8,27 +9,26 @@
|
||||||
let map: L.Map | undefined;
|
let map: L.Map | undefined;
|
||||||
|
|
||||||
onMount(async () => {
|
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
|
// 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
|
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
|
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
|
scrollWheelZoom: true // Changed to true to enable zoom with scrollwheel
|
||||||
// tap: false
|
// tap: false
|
||||||
});
|
});
|
||||||
|
|
||||||
/* Control panel to display map layers */
|
window.L.maplibreGL({
|
||||||
// var controlLayers = L.control.layers( null, null, {
|
style: style as any,
|
||||||
// position: "topright",
|
attribution:
|
||||||
// collapsed: false
|
'© <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>'
|
||||||
// }).addTo(map);
|
} as any).addTo(map);
|
||||||
|
|
||||||
// display Carto basemap tiles with light features and labels
|
// display Carto basemap tiles with light features and labels
|
||||||
L.tileLayer('https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png', {
|
// L.tileLayer.provider('Stadia.AlidadeSmoothBackground').addTo(map);
|
||||||
attribution:
|
mapMap(map, window.L);
|
||||||
'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>, © <a href="https://carto.com/attribution">CARTO</a>'
|
|
||||||
}).addTo(map);
|
|
||||||
mapMap(map, L);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
onDestroy(() => {
|
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