Map: Init

This commit is contained in:
2026-02-22 20:06:00 +01:00
parent 69d47ea4dd
commit 75c2b3dfcd
22 changed files with 880 additions and 35 deletions

View File

@@ -0,0 +1,58 @@
const API_BASE = "https://maps.start-it.nl/api";
const TILE_BASE = "https://maps.start-it.nl";
const sources = {
osm: new ol.source.OSM(),
"pdok-luchtfoto": new ol.source.XYZ({
url: "https://service.pdok.nl/hwh/luchtfotorgb/wmts/v1_0/Actueel_ortho25/EPSG:3857/{z}/{x}/{y}.jpeg"
}),
"pdok-grijs": new ol.source.XYZ({
url: "https://service.pdok.nl/brt/achtergrondkaart/wmts/v2_0/grijs/EPSG:3857/{z}/{x}/{y}.png"
})
};
const baseLayer = new ol.layer.Tile({ source: sources.osm });
const kavelLayer = new ol.layer.VectorTile({
source: new ol.source.VectorTile({
format: new ol.format.MVT(),
url: `${TILE_BASE}/public.perceel/{z}/{x}/{y}.pbf`
}),
style: new ol.style.Style({
stroke: new ol.style.Stroke({ color: 'rgba(185, 89, 19, 0.4)', width: 1 })
})
});
const map = new ol.Map({
target: 'map',
layers: [baseLayer, kavelLayer],
view: new ol.View({ center: ol.proj.fromLonLat([5.594, 52.285]), zoom: 16 })
});
document.getElementById('doSearch').addEventListener('click', async () => {
const pc = document.getElementById('pc').value.replace(/\s+/g, '');
const hn = document.getElementById('hn').value;
try {
const response = await fetch(`${API_BASE}/analyse?postcode=${pc}&huisnummer=${hn}`);
const data = await response.json();
if (data.results && data.results.length > 0) {
updateUI(data.results[0]);
zoomToResult(data.results[0]);
}
} catch (err) {
console.error("Fout bij ophalen data", err);
}
});
function updateUI(row) {
document.getElementById('placeholder-text').style.display = 'none';
document.getElementById('data-content').style.display = 'block';
document.getElementById('res-adres').innerText = row.adres;
document.getElementById('res-bouwjaar').innerText = row.hoofdgebouw_bouwjaar;
document.getElementById('res-kavel').innerText = row.kavel_m2 + " m²";
document.getElementById('res-bebouwd').innerText = row.bebouwd_m2 + " m²";
document.getElementById('res-max').innerText = row.max_mantelzorgwoning_m2 + " m²";
document.getElementById('res-omgevingswet').href = `https://omgevingswet.overheid.nl/regels-op-de-kaart/documenten?locatie=${encodeURIComponent(row.adres)}`;
}

View File

@@ -1,3 +1,13 @@
// Globals
$container-max-widths: (
sm: 540px,
md: 720px,
lg: 960px,
xl: 1140px,
xxl: 1520px
);
// Imports
@import "node_modules/bootstrap/scss/bootstrap";
@@ -42,7 +52,6 @@
src: url('/fonts/kantumruy-500.woff2') format('woff2');
}
@font-face {
font-family: 'Kantumruy Pro';
font-style: normal;
@@ -52,7 +61,7 @@
}
// Defaults
$van-emous-blue: #A8BBD5;
$van-emous-blue: #dce4ee;
$van-emous-orange: #b95913;
$nav-link-color: #212121;
$primary: $van-emous-orange;
@@ -65,6 +74,20 @@ $headings-font-family: $kantumruy-font;
$headings-font-weight: 500;
$headings-color: #212121;
.text-primary {
color: $van-emous-orange !important;
}
.bg-secondary {
background-color: $van-emous-blue !important;
}
body {
font-family: $font-family-sans-serif;
font-weight: 400;
-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
[class^="display-"] {
@@ -84,6 +107,22 @@ h2, .h2 {
margin-bottom: 1.25rem;
}
h6 {
font-size: 20px;
line-height: normal;
font-weight: 500;
letter-spacing: 0.4em;
color: darken($van-emous-blue, 40%) !important;
margin: 0;
padding-bottom: 20px;
display: block;
@media (max-width: 991px) {
font-size: 14px;
letter-spacing: 0.3em;
}
}
p {
font-family: $mukta-font;
font-size: 18px;
@@ -94,21 +133,45 @@ p {
padding-bottom: 20px;
}
.panel {
border-radius: 40px;
}
.bg-primary {
background: $van-emous-orange !important;
}
.bg-light {
background: #f0f1ec !important;
}
.bg-blue {
background: $van-emous-blue;
}
.bg-blue-dark {
background: #a8bbd5;
}
.footer-main {
border-radius: 100px 100px 0 0;
}
.lead {
font-weight: 400;
}
// Menu
.top-bar {
background-color: $van-emous-blue;
background-color: #a8bbd5;
font-size: 0.9rem;
color: white;
font-size:18px;
font-family: $mukta-font;
a { color: white; text-decoration: none; }
}
.navbar-nav .nav-link {
color: $nav-link-color;
font-weight: 500;
font-weight: 600;
&:hover { color: $van-emous-orange; }
}
@@ -122,7 +185,8 @@ p {
position: sticky !important;
top: 0 !important;
z-index: 1030 !important;
background-color: #ffffff !important;
background-color: rgba(255, 255, 255, 0.9) !important;
backdrop-filter: blur(4px);
}
@keyframes fadeIn {
@@ -143,13 +207,12 @@ p {
font-weight: 400;
color: #fff;
position: relative;
transition: all 0.2s ease-in-out; // Zorgt voor de vloeiende verschuiving
transition: all 0.2s ease-in-out;
display: flex;
align-items: center;
// Het '>' symbool (onzichtbaar in ruststand)
&::before {
content: "\F285"; // Bootstrap Icons code voor 'chevron-right'
content: "\F285";
font-family: "bootstrap-icons";
position: absolute;
left: 0.5rem;
@@ -161,11 +224,11 @@ p {
&:hover {
background-color: $van-emous-orange;
color: #fff;
padding-left: 2.2rem; // Schuift de tekst naar rechts om ruimte te maken voor >
padding-left: 2.2rem;
&::before {
opacity: 1;
left: 1.2rem; // Laat het symbool subtiel 'invliegen'
left: 1.2rem;
}
}
@@ -207,6 +270,22 @@ p {
}
}
.hero-image-dynamic {
width: 100%;
background-position: center center;
background-size: cover;
background-repeat: no-repeat;
border-radius: 40px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
min-height: 400px;
@media (min-width: 992px) {
min-height: 600px;
aspect-ratio: 21 / 9;
}
}
// Buttons
.btn-cta {
display: inline-block;
@@ -254,4 +333,162 @@ p {
display: flex;
justify-content: flex-end;
}
}
// Hero
.hero-rounded-img {
border-radius: 40px;
width: 100%;
height: auto;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
image-rendering: -webkit-optimize-contrast;
}
.hero-image-container {
position: relative;
overflow: hidden;
animation: imageReveal 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}
@keyframes imageReveal {
from {
opacity: 0;
transform: translateY(30px) scale(1.02);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
@media (max-width: 768px) {
.hero-rounded-img {
border-radius: 20px;
}
}
// USPS
.usp-bar {
.usp-item {
.usp-text {
font-family: $mukta-font;
font-size: 18px;
font-weight: 500;
color: #1a1a1a;
white-space: nowrap;
}
svg {
flex-shrink: 0;
}
}
@media (max-width: 991px) {
.row {
flex-direction: column;
align-items: flex-start;
padding-left: 1rem;
}
}
}
.modellen-sectie {
.model-card {
min-height: 480px;
border: none;
background-color: #fff;
&:hover .model-card-bg {
transform: scale(1.05);
}
}
.model-card-bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-size: cover;
background-position: center;
transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
z-index: 1;
}
.model-card-overlay {
position: relative;
height: 100%;
width: 100%;
z-index: 2;
background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0) 100%);
}
.price-badge {
background: rgba(255, 255, 255, 0.95);
display: inline-block;
padding: 10px 20px;
border-radius: 15px;
color: #1a1a1a;
align-self: flex-start;
span:first-child {
color: $van-emous-orange;
font-size: 0.7rem;
letter-spacing: 0.1em;
}
}
.model-info {
text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
}
// Map
#col-map {
transition: flex 0.6s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
#col-results {
opacity: 0;
transform: translateX(20px);
transition: opacity 0.5s ease-out, transform 0.5s ease-out;
display: none;
}
#col-results.animate-in {
display: block !important;
opacity: 1 !important;
transform: translateX(0) !important;
}
// Footer
.footer-main {
.footer-inner {
border-radius: 60px 60px 0 0;
background-color: #e2eaf0 !important;
}
.icon-circle {
width: 45px;
height: 45px;
background-color: $van-emous-orange;
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.2rem;
}
.form-control {
box-shadow: none;
&::placeholder {
color: #adb5bd;
}
}
a:hover {
color: $van-emous-orange !important;
}
}