Close to the city. More secluded.

Liiva põik 1 is located in the village of Peetrimõisa, in the immediate vicinity of the town of Viljandi. This is a place for those who appreciate a quieter environment and their own space, but do not wish to remain too far from urban life.

Daily trips to Viljandi are convenient, while a quieter atmosphere and more privacy await upon returning home.

#liiva-map-wrap{ --lm-accent:#1F2A37; /* kodu markeri ja nuppude põhitoon */ --lm-bg:#ffffff; --lm-text:#1F2A37; --lm-muted:#6B7280; --lm-line:#E5E7EB; --lm-soft:#F4F5F7; position:relative; width:100%; /* täidab konteineri laiuse */ height:86vh; min-height:560px; max-height:920px; font-family:inherit; color:var(--lm-text); overflow:hidden; background:#e9ecef; } #liiva-map-wrap *{box-sizing:border-box} #liiva-map{position:absolute; inset:0; z-index:1; overflow:hidden} #liiva-map-wrap .gm-style{font-family:inherit} /* ---------- külgpaneel ---------- */ .lm-panel{ position:absolute; z-index:500; top:24px; left:24px; bottom:24px; width:360px; display:flex; flex-direction:column; background:var(--lm-bg); border-radius:14px; box-shadow:0 10px 40px rgba(17,24,39,.18); overflow:hidden; } .lm-head{padding:20px 20px 12px} .lm-head h3{margin:0 0 4px; font-size:20px; line-height:1.25; font-weight:600; color:var(--lm-text)} .lm-head p{margin:0; font-size:13.5px; color:var(--lm-muted); line-height:1.45} .lm-chips{display:flex; flex-wrap:wrap; gap:6px; padding:4px 20px 14px; border-bottom:1px solid var(--lm-line)} .lm-chip{ display:inline-flex; align-items:center; gap:6px; padding:6px 11px; border-radius:999px; cursor:pointer; border:1px solid var(--lm-line); background:#fff; color:var(--lm-text); font:inherit; font-size:13px; line-height:1; white-space:nowrap; transition:background .15s,border-color .15s,color .15s; } .lm-chip:hover{border-color:#cfd3d9} .lm-chip .lm-dot{width:9px; height:9px; border-radius:50%; background:var(--c)} .lm-chip[aria-pressed="true"]{background:var(--lm-accent); border-color:var(--lm-accent); color:#fff} .lm-chip[aria-pressed="true"] .lm-dot{box-shadow:0 0 0 2px #fff} .lm-chip:focus-visible,.lm-item:focus-visible,.lm-toggle:focus-visible{outline:2px solid var(--lm-accent); outline-offset:2px} .lm-list{list-style:none; margin:0; padding:6px 0; overflow-y:auto; flex:1} .lm-item{ display:flex; align-items:center; gap:12px; width:100%; padding:9px 20px; cursor:pointer; background:none; border:0; text-align:left; font:inherit; color:inherit; } .lm-item:hover,.lm-item.is-active{background:var(--lm-soft)} .lm-ico{ flex:none; width:30px; height:30px; border-radius:50%; display:grid; place-items:center; background:var(--c); color:#fff; } .lm-ico svg{width:16px; height:16px} .lm-txt{flex:1; min-width:0} .lm-name{display:block; font-size:14px; font-weight:500; line-height:1.3; white-space:nowrap; overflow:hidden; text-overflow:ellipsis} .lm-sub{display:block; font-size:12px; color:var(--lm-muted); margin-top:1px} .lm-dist{flex:none; font-size:12.5px; font-variant-numeric:tabular-nums; color:var(--lm-muted)} .lm-foot{padding:10px 20px; font-size:11.5px; color:var(--lm-muted); border-top:1px solid var(--lm-line)} /* ---------- markerid ---------- */ .lm-marker{ width:32px; height:32px; border-radius:50%; display:grid; place-items:center; color:#fff; background:var(--c); border:2.5px solid #fff; box-shadow:0 2px 6px rgba(0,0,0,.3); transition:transform .15s; } .lm-marker svg{width:16px; height:16px} .lm-marker.is-active{transform:scale(1.3)} .lm-home{ width:48px; height:48px; border-radius:50%; display:grid; place-items:center; color:#fff; background:var(--lm-accent); border:3px solid #fff; box-shadow:0 4px 14px rgba(0,0,0,.35); position:relative; } .lm-home svg{width:24px; height:24px} .lm-home::after{ content:""; position:absolute; inset:-10px; border-radius:50%; border:2px solid var(--lm-accent); opacity:.35; animation:lmPulse 2.4s ease-out infinite; } @keyframes lmPulse{0%{transform:scale(.7);opacity:.5}100%{transform:scale(1.5);opacity:0}} .lm-ov{position:absolute; transform:translate(-50%,-50%); cursor:pointer} .lm-ov.is-home{z-index:1000 !important} .lm-home-label{ position:absolute; left:50%; bottom:calc(100% + 12px); transform:translateX(-50%); background:var(--lm-accent); color:#fff; border-radius:6px; white-space:nowrap; font-weight:600; font-size:13px; line-height:1.2; padding:5px 9px; box-shadow:0 3px 10px rgba(0,0,0,.25); } .lm-home-label::after{ content:""; position:absolute; left:50%; top:100%; transform:translateX(-50%); border:6px solid transparent; border-top-color:var(--lm-accent); } .lm-ring-label{ background:rgba(255,255,255,.88); color:var(--lm-muted); white-space:nowrap; font-size:11px; line-height:1.2; padding:1px 5px; border-radius:4px; cursor:default; pointer-events:none; } .lm-missing{ position:absolute; inset:0; z-index:5; display:grid; place-items:center; padding:24px 24px 24px 410px; font-size:15px; line-height:1.5; color:var(--lm-muted); text-align:center; background:#e9ecef; } /* ---------- popup (Google InfoWindow) ---------- */ #liiva-map-wrap .gm-style-iw-c{border-radius:10px !important; padding:14px 16px !important; box-shadow:0 6px 24px rgba(0,0,0,.2) !important} #liiva-map-wrap .gm-style-iw-d{overflow:auto !important; padding:0 !important} #liiva-map-wrap .gm-style-iw-chr{position:absolute; top:0; right:0} .lm-pop{min-width:200px; padding-right:28px; font-family:inherit} .lm-pop-cat{font-size:11px; letter-spacing:.06em; text-transform:uppercase; font-weight:600; color:var(--c)} .lm-pop-name{font-size:15px; font-weight:600; margin:3px 0 2px; color:var(--lm-text)} .lm-pop-addr{font-size:12.5px; color:var(--lm-muted)} .lm-pop-dist{font-size:13px; margin-top:8px; color:var(--lm-text)} .lm-pop-link{display:inline-block; margin-top:10px; font-size:13px; font-weight:500; color:var(--lm-accent)!important; text-decoration:underline} .lm-toggle{display:none} /* ---------- teema/Elementori nupustiilide tühistamine ---------- */ #liiva-map-wrap button.lm-chip, #liiva-map-wrap button.lm-item, #liiva-map-wrap button.lm-toggle{ margin:0 !important; min-height:0 !important; width:auto; box-shadow:none !important; text-transform:none !important; letter-spacing:normal !important; text-decoration:none !important; font-family:inherit !important; font-weight:400 !important; transform:none !important; } #liiva-map-wrap button.lm-chip{ padding:6px 11px !important; font-size:13px !important; line-height:1 !important; border:1px solid var(--lm-line) !important; border-radius:999px !important; background:#fff !important; color:var(--lm-text) !important; } #liiva-map-wrap button.lm-chip:hover, #liiva-map-wrap button.lm-chip:focus{background:#fff !important; color:var(--lm-text) !important; border-color:#cfd3d9 !important} #liiva-map-wrap button.lm-chip[aria-pressed="true"], #liiva-map-wrap button.lm-chip[aria-pressed="true"]:hover{ background:var(--lm-accent) !important; border-color:var(--lm-accent) !important; color:#fff !important; } #liiva-map-wrap button.lm-item{ width:100% !important; padding:9px 20px !important; border:0 !important; border-radius:0 !important; background:transparent !important; color:var(--lm-text) !important; font-size:14px !important; line-height:1.3 !important; white-space:normal !important; } #liiva-map-wrap button.lm-item:hover, #liiva-map-wrap button.lm-item:focus, #liiva-map-wrap button.lm-item.is-active{background:var(--lm-soft) !important; color:var(--lm-text) !important} #liiva-map-wrap .lm-name{font-size:14px !important; font-weight:500 !important; line-height:1.3 !important; margin:0 !important; color:var(--lm-text) !important} #liiva-map-wrap .lm-sub{font-size:12px !important; line-height:1.3 !important; margin:1px 0 0 !important; color:var(--lm-muted) !important} #liiva-map-wrap .lm-dist{font-size:12.5px !important; line-height:1.3 !important; color:var(--lm-muted) !important} #liiva-map-wrap .lm-item span{margin:0; padding:0} #liiva-map-wrap .lm-chip .lm-dot{margin:0 !important; padding:0 !important; flex:none; display:inline-block !important} #liiva-map-wrap button.lm-chip{display:inline-flex !important; align-items:center !important; gap:6px !important; white-space:nowrap !important} #liiva-map-wrap .lm-list,#liiva-map-wrap .lm-li{margin:0 !important; padding-left:0 !important; list-style:none !important} #liiva-map-wrap .lm-list{padding:6px 0 !important} #liiva-map-wrap .lm-li::before,#liiva-map-wrap .lm-li::marker{content:none !important} #liiva-map-wrap button.lm-toggle{ padding:11px !important; border:1px solid var(--lm-line) !important; border-radius:8px !important; background:#fff !important; color:var(--lm-text) !important; font-size:14px !important; font-weight:500 !important; } /* ---------- mobiil ---------- */ @media (max-width:767px){ #liiva-map-wrap{height:auto; max-height:none; min-height:0; overflow:visible; background:#fff} #liiva-map{position:relative; inset:auto; height:62vh; min-height:380px} .lm-panel{position:relative; top:auto; left:auto; bottom:auto; width:100%; border-radius:0; box-shadow:none} .lm-head{padding:18px 16px 10px} .lm-chips{flex-wrap:nowrap; overflow-x:auto; padding:4px 16px 12px; scrollbar-width:none} .lm-chips::-webkit-scrollbar{display:none} .lm-list{max-height:none; overflow:visible} .lm-list.is-collapsed .lm-li:nth-child(n+7){display:none} .lm-item{padding:10px 16px} .lm-toggle{ display:block; width:calc(100% - 32px); margin:4px 16px 12px; padding:11px; border:1px solid var(--lm-line); border-radius:8px; background:#fff; color:var(--lm-text); font:inherit; font-size:14px; font-weight:500; cursor:pointer; } .lm-foot{padding:10px 16px 16px} .lm-missing{padding:24px} #liiva-map-wrap button.lm-item{padding:10px 16px !important} #liiva-map-wrap button.lm-toggle{width:calc(100% - 32px) !important; margin:4px 16px 12px !important} }
/* ===================================================================== ⬇⬇⬇ KLEEBI SIIA OMA GOOGLE MAPS API VÕTI ⬇⬇⬇ ===================================================================== */ var LIIVA_GOOGLE_MAPS_KEY = 'AIzaSyAYeEmHNm2JvGr3fO-g3VBpHpzkj5wkgqU'; /* ===================================================================== */ (function(){ var wrap = document.getElementById('liiva-map-wrap'); if (!wrap || wrap.dataset.ready) return; wrap.dataset.ready = '1'; /* ---------------- keel ---------------- */ var EN = (document.documentElement.lang || '').toLowerCase().indexOf('en') === 0; var T = EN ? { title:'What’s nearby', lead:'Liiva põik 1 is on the edge of Viljandi – shops, schools, restaurants, the lake and the historic old town are all a short drive away.', foot:'Distances are straight-line from Liiva põik 1.', all:'All', home:'Liiva põik 1', homeSub:'Peetrimõisa village, Viljandi parish', route:'Directions from Liiva põik 1 →', away:'from home', more:'Show all', less:'Show less', nokey:'The map could not be loaded: Google Maps API key is missing.', auth:'Google rejected the API key. Check: (1) the key’s website restriction includes this site’s address, (2) billing is enabled, (3) Maps JavaScript API is enabled. Changes can take up to 5 minutes.', load:'Google Maps script could not be loaded (network or ad blocker).', js:'Map error: ' } : { title:'Mis on lähedal', lead:'Liiva põik 1 asub Viljandi külje all – poed, koolid, restoranid, järv ja ajalooline vanalinn on mõne minuti sõidu kaugusel.', foot:'Kaugused on linnulennult Liiva põik 1-st.', all:'Kõik', home:'Liiva põik 1', homeSub:'Peetrimõisa küla, Viljandi vald', route:'Teejuhised Liiva põik 1-st →', away:'kodust', more:'Näita kõiki', less:'Näita vähem', nokey:'Kaarti ei õnnestunud laadida: Google Maps API võti puudub.', auth:'Google lükkas API võtme tagasi. Kontrolli: (1) võtme veebisaidi piirangutes on selle lehe aadress, (2) arveldus (Billing) on aktiivne, (3) Maps JavaScript API on lubatud. Muudatused võivad jõustuda kuni 5 minutiga.', load:'Google Mapsi skripti ei õnnestunud laadida (võrguprobleem või reklaamiblokeerija).', js:'Kaardi viga: ' }; wrap.querySelectorAll('[data-i18n]').forEach(function(el){ el.textContent = T[el.getAttribute('data-i18n')]; }); var mapEl = document.getElementById('liiva-map'); mapEl.setAttribute('aria-label', T.title); /* ---------------- ikoonid ---------------- */ var S = function(p){ return ''+p+''; }; var ICON = { home: S(''), shop: S(''), bus: S(''), culture:S(''), nature:S(''), edu: S(''), health:S(''), sport: S(''), food: S(''), spa: S(''), history:S(''), fuel: S('') }; /* ---------------- kategooriad ---------------- */ var CATS = [ {id:'shop', et:'Poed', en:'Shops', c:'#E07A2E'}, {id:'food', et:'Restoranid ja kohvikud', en:'Restaurants & cafés', c:'#C2185B'}, {id:'bus', et:'Ühistransport', en:'Transport', c:'#2F6FB3'}, {id:'culture',et:'Kultuur ja muuseumid', en:'Culture & museums', c:'#8A4FB0'}, {id:'history',et:'Ajaloolised paigad', en:'Historic landmarks', c:'#6B4E2E'}, {id:'nature', et:'Järv ja loodus', en:'Lake & nature', c:'#15907F'}, {id:'spa', et:'Spaad', en:'Spas', c:'#0891B2'}, {id:'edu', et:'Koolid ja lasteaiad', en:'Schools & kindergartens', c:'#B7791F'}, {id:'health', et:'Tervis', en:'Health', c:'#D64545'}, {id:'sport', et:'Sport', en:'Sports', c:'#3F8F4A'}, {id:'fuel', et:'Tanklad', en:'Fuel', c:'#5B6470'} ]; var CAT = {}; CATS.forEach(function(c){ CAT[c.id]=c; }); /* ---------------- kodu ja objektid ---------------- */ var HOME = [58.37568, 25.62497]; var PLACES = [ // Poed {cat:'shop', n:'Rimi Hyper', a:'Tallinna tn 41', ll:[58.36983,25.59759]}, {cat:'shop', n:'Centrumi Selver', a:'Tallinna tn 22', ll:[58.36755,25.59821]}, {cat:'shop', n:'Männimäe Selver', a:'Riia mnt 35', ll:[58.35293,25.58377]}, {cat:'shop', n:'Maxima X', a:'Tallinna tn 60', ll:[58.37673,25.59847]}, {cat:'shop', n:'Maxima X', a:'Vaksali tn 11', ll:[58.36190,25.58248]}, {cat:'shop', n:'Lidl', a:'Riia mnt 1', ll:[58.35847,25.58407]}, {cat:'shop', n:'Uueveski Konsum', a:'Uueveski tee 16a', ll:[58.36998,25.61156]}, {cat:'shop', n:'Koidu Konsum', a:'Koidu tn 3', ll:[58.36501,25.60255]}, {cat:'shop', n:'Paalalinna Maksimarket', a:'Lääne tn 2', ll:[58.37059,25.58312]}, {cat:'shop', n:'Männimäe Maksimarket', a:'Puidu tn 2', ll:[58.34790,25.57914]}, // Transport {cat:'bus', n:{et:'Peetrimõisa bussipeatus',en:'Peetrimõisa bus stop'}, a:{et:'Peetrimõisa küla',en:'Peetrimõisa village'}, ll:[58.37615,25.62104]}, {cat:'bus', n:{et:'Viljandi bussijaam',en:'Viljandi bus station'}, a:{et:'Viljandi kesklinn',en:'Viljandi centre'}, ll:[58.36921,25.59883]}, {cat:'bus', n:{et:'Viljandi raudteejaam',en:'Viljandi train station'}, a:'Vaksali tn 44', ll:[58.35758,25.57407]}, // Kultuur {cat:'culture', n:{et:'Viljandi Muuseum',en:'Viljandi Museum'}, a:'Johan Laidoneri plats 10', ll:[58.36320,25.59970]}, {cat:'culture', n:{et:'Kondase Keskus',en:'Kondas Centre (art museum)'}, a:'Pikk tn 8', ll:[58.36186,25.59748]}, {cat:'culture', n:{et:'Eesti Pärimusmuusika Keskus',en:'Estonian Traditional Music Centre'}, a:'Tasuja pst 6', ll:[58.36116,25.59581]}, {cat:'culture', n:{et:'Ugala teater',en:'Ugala Theatre'}, a:'Vaksali tn 7', ll:[58.36206,25.58780]}, // Ajaloolised paigad {cat:'history', n:{et:'Lossimäed ja ordulinnuse varemed',en:'Castle Hills & Order castle ruins'}, a:{et:'Viljandi vanalinn · 13. saj',en:'Viljandi old town · 13th c.'}, ll:[58.35910,25.59563]}, {cat:'history', n:{et:'Viljandi rippsild',en:'Viljandi suspension bridge'}, a:{et:'Lossimäed · 1879',en:'Castle Hills · 1879'}, ll:[58.35892,25.59421]}, {cat:'history', n:{et:'Jaani kirik',en:'St. John's Church'}, a:'Pikk tn 6', ll:[58.36201,25.59653]}, {cat:'history', n:{et:'Pauluse kirik',en:'St. Paul's Church'}, a:'Kiriku tn 5', ll:[58.36411,25.59188]}, {cat:'history', n:{et:'Vana veetorn (vaateplatvorm)',en:'Old water tower (viewpoint)'}, a:{et:'Laidoneri plats · 1911',en:'Laidoneri square · 1911'}, ll:[58.36278,25.60083]}, {cat:'history', n:{et:'Viljandi raekoda',en:'Viljandi Town Hall'}, a:'Linnu tn 2', ll:[58.36296,25.60165]}, {cat:'history', n:{et:'Heimtali mõis',en:'Heimtali Manor'}, a:'Pargi 1, Heimtali', ll:[58.32231,25.50576]}, // Restoranid ja kohvikud {cat:'food', n:{et:'Härjapea kõrts',en:'Härjapea Tavern'}, a:{et:'Karjamõisa tee 6, Peetrimõisa',en:'Karjamõisa tee 6, Peetrimõisa'}, ll:[58.37765,25.62336]}, {cat:'food', n:'Fellin', a:'Tasuja pst 1', ll:[58.36351,25.59611]}, {cat:'food', n:'koduKOHVIK', a:'Tartu tn 1', ll:[58.36532,25.59696]}, {cat:'food', n:'Bodega Veiniresto', a:'Lossi tn 15', ll:[58.36346,25.59937]}, {cat:'food', n:'Villa Maria', a:'Pikk tn 4', ll:[58.36247,25.59676]}, {cat:'food', n:'Aida Kohvik', a:'Tasuja pst 6', ll:[58.36094,25.59596]}, {cat:'food', n:'MONK', a:'Tallinna tn 22', ll:[58.36768,25.59767]}, {cat:'food', n:'Aasia Billa', a:'Tartu tn 6a', ll:[58.36499,25.59825]}, {cat:'food', n:'DayOff kohvik', a:'Leola tn 67', ll:[58.37857,25.59434]}, // Spaad {cat:'spa', n:'SPA Hotel Villa Peetrimõisa', a:'Pirni tn 4', ll:[58.37318,25.61575]}, {cat:'spa', n:{et:'Schloss Fellin (spaa ja restoran)',en:'Schloss Fellin (spa & restaurant)'}, a:'Tasuja pst 4', ll:[58.36210,25.59380]}, // Järv ja loodus {cat:'nature', n:{et:'Viljandi järve rand',en:'Lake Viljandi beach'}, a:'Ranna pst', ll:[58.35987,25.60587]}, {cat:'nature', n:{et:'Paadi- ja SUP-laenutus',en:'Boat & SUP rental'}, a:'Ranna pst 11', ll:[58.35970,25.60489]}, {cat:'nature', n:{et:'Viljandi järve matkarada (12 km)',en:'Lake Viljandi hiking trail (12 km)'}, a:{et:'Järve ümbruses',en:'Around the lake'}, ll:[58.35920,25.59875]}, {cat:'nature', n:{et:'Ranna mänguväljak',en:'Lakeside playground'}, a:'Ranna pst 5a', ll:[58.36011,25.60678]}, // Haridus {cat:'edu', n:'Viljandi Gümnaasium', a:'Hariduse tn 2', ll:[58.36247,25.59116]}, {cat:'edu', n:'Viljandi Paalalinna Kool', a:'Paala tee 46', ll:[58.37164,25.57385]}, {cat:'edu', n:'Viljandi Jakobsoni Kool', a:'Riia mnt 91', ll:[58.34668,25.58125]}, {cat:'edu', n:'Jaagu Lasteaed-Põhikool', a:'Kase tee 2, Jämejala', ll:[58.38133,25.57697]}, {cat:'edu', n:{et:'Lasteaed Karlsson',en:'Karlsson kindergarten'}, a:'Kesk-Kaare tn 19', ll:[58.37270,25.57997]}, {cat:'edu', n:{et:'Lasteaed Krõllipesa',en:'Krõllipesa kindergarten'}, a:'Kagu tn 9', ll:[58.36905,25.58384]}, {cat:'edu', n:{et:'Lasteaed Midrimaa',en:'Midrimaa kindergarten'}, a:'Tehnika tn 12', ll:[58.35945,25.58136]}, {cat:'edu', n:{et:'Lasteaed Rüblik',en:'Rüblik kindergarten'}, a:'Nooruse tn 3, Viiratsi', ll:[58.35962,25.63829]}, // Tervis {cat:'health', n:{et:'Viljandi haigla (Tervikum)',en:'Viljandi Hospital (Tervikum)'}, a:'C. R. Jakobsoni tn 2a', ll:[58.36718,25.59412]}, {cat:'health', n:{et:'Benu apteek',en:'Benu pharmacy'}, a:'C. R. Jakobsoni tn 2', ll:[58.36729,25.59297]}, {cat:'health', n:{et:'Apotheka apteek',en:'Apotheka pharmacy'}, a:'Tallinna tn 24', ll:[58.36762,25.59793]}, // Sport {cat:'sport', n:{et:'Viljandi Spordikeskus',en:'Viljandi Sports Centre'}, a:'Vaksali tn 4', ll:[58.36378,25.59423]}, {cat:'sport', n:{et:'Viljandi linnastaadion',en:'Viljandi City Stadium'}, a:'Vesiflirdi allee 3', ll:[58.36110,25.60681]}, // Tanklad {cat:'fuel', n:'Circle K Viiratsi', a:'Tartu tn 102', ll:[58.36286,25.63284]}, {cat:'fuel', n:'Neste', a:'Tallinna tn 97d', ll:[58.37867,25.59551]}, {cat:'fuel', n:'Alexela', a:'Uus tn 4', ll:[58.36811,25.59978]} ]; var L_ = EN ? 'en' : 'et'; var txt = function(v){ return typeof v === 'string' ? v : v[L_]; }; function km(a,b){ var R=6371, r=Math.PI/180, dLa=(b[0]-a[0])*r, dLo=(b[1]-a[1])*r; var h=Math.sin(dLa/2)*Math.sin(dLa/2)+Math.cos(a[0]*r)*Math.cos(b[0]*r)*Math.sin(dLo/2)*Math.sin(dLo/2); return 2*R*Math.asin(Math.sqrt(h)); } function fmt(d){ if (d < 1) return Math.round(d*100)*10 + ' m'; var s = d.toFixed(1); return (EN ? s : s.replace('.',',')) + ' km'; } PLACES.forEach(function(p,i){ p.id=i; p.d=km(HOME,p.ll); }); PLACES.sort(function(a,b){ return a.d-b.d; }); var isMobile = function(){ return window.matchMedia('(max-width:767px)').matches; }; /* ---------------- paneel (töötab ka enne kaardi laadimist) ---------------- */ var chipsEl = wrap.querySelector('.lm-chips'); var listEl = wrap.querySelector('.lm-list'); var toggle = wrap.querySelector('.lm-toggle'); var active = 'all'; var M = null; // kaardi objektid, kui Google on laetud var markers = {}; function chip(id,label,color){ var b=document.createElement('button'); b.type='button'; b.className='lm-chip'; b.dataset.cat=id; b.setAttribute('aria-pressed', id===active ? 'true':'false'); b.innerHTML=(color?'':'')+label; b.addEventListener('click', function(){ active=id; render(true); }); chipsEl.appendChild(b); } chip('all', T.all); CATS.forEach(function(c){ chip(c.id, c[L_], c.c); }); function markerEl(id){ var m = markers[id]; return m && m.div ? m.div.firstChild : null; } function setActive(id, fromList){ wrap.querySelectorAll('.lm-marker.is-active').forEach(function(e){ e.classList.remove('is-active'); }); listEl.querySelectorAll('.lm-item.is-active').forEach(function(e){ e.classList.remove('is-active'); }); if (id === null) return; var el = markerEl(id); if (el) el.classList.add('is-active'); var li = listEl.querySelector('[data-id="'+id+'"]'); if (li){ li.classList.add('is-active'); if(!fromList && !isMobile()) li.scrollIntoView({block:'nearest', behavior:'smooth'}); } } function render(doFit){ chipsEl.querySelectorAll('.lm-chip').forEach(function(b){ b.setAttribute('aria-pressed', b.dataset.cat===active ? 'true':'false'); }); listEl.innerHTML=''; var shown = PLACES.filter(function(p){ return active==='all' || p.cat===active; }); if (M){ if (M.info) M.info.close(); PLACES.forEach(function(p){ markers[p.id].setMap(shown.indexOf(p) > -1 ? M.map : null); }); } shown.forEach(function(p){ var c = CAT[p.cat]; var li = document.createElement('li'); li.className='lm-li'; li.innerHTML = ''; var btn = li.firstChild; btn.addEventListener('click', function(){ if (!M) return; if (isMobile()) mapEl.scrollIntoView({behavior:'smooth', block:'start'}); M.map.panTo({lat:p.ll[0], lng:p.ll[1]}); if (M.map.getZoom() 6; listEl.classList.toggle('is-collapsed', many); toggle.hidden = !many; toggle.textContent = T.more; if (doFit && M) fit(shown.map(function(p){ return p.ll; })); } toggle.addEventListener('click', function(){ var c = listEl.classList.toggle('is-collapsed'); toggle.textContent = c ? T.more : T.less; }); render(false); function padding(){ return isMobile() ? {top:40,right:30,bottom:30,left:30} : {top:50,right:60,bottom:50,left:410}; } function fit(pts){ var b = new google.maps.LatLngBounds(); pts.concat([HOME]).forEach(function(ll){ b.extend({lat:ll[0], lng:ll[1]}); }); M.map.fitBounds(b, padding()); google.maps.event.addListenerOnce(M.map, 'idle', function(){ if (M.map.getZoom() > 15) M.map.setZoom(15); }); } function popupHtml(p){ var c = CAT[p.cat]; var dirUrl = 'https://www.google.com/maps/dir/?api=1&origin=' + HOME.join(',') + '&destination=' + p.ll.join(','); return '
'+c[L_]+'
'+ '
'+txt(p.n)+'
'+ '
'+txt(p.a)+'
'+ '
'+fmt(p.d)+' '+T.away+'
'+ ''+T.route+'
'; } function openInfo(p){ M.info.setContent(popupHtml(p)); M.info.setPosition({lat:p.ll[0], lng:p.ll[1]}); M.info.open({map:M.map}); setActive(p.id, false); } function showError(kind, detail){ var msg = (T[kind] || T.js) + (detail ? String(detail) : ''); if (window.console) console.error('[Liiva kaart] ' + kind + ': ' + msg + ' | page: ' + location.href); var d = wrap.querySelector('.lm-missing'); if (!d){ d=document.createElement('div'); d.className='lm-missing'; mapEl.appendChild(d); } d.textContent = msg; } /* ---------------- Google kaart ---------------- */ function initMap(){ // HTML-marker (OverlayView) – ei vaja Map ID-d ega lisateeke function HtmlMarker(ll, html, cls, onClick, z){ this.pos = new google.maps.LatLng(ll[0], ll[1]); this.html = html; this.cls = cls || ''; this.onClick = onClick; this.z = z || 1; } HtmlMarker.prototype = new google.maps.OverlayView(); HtmlMarker.prototype.onAdd = function(){ var d = this.div = document.createElement('div'); d.className = 'lm-ov ' + this.cls; d.style.zIndex = this.z; d.innerHTML = this.html; var self = this; if (this.onClick){ d.addEventListener('click', function(e){ e.stopPropagation(); self.onClick(); }); } google.maps.OverlayView.preventMapHitsAndGesturesFrom(d); this.getPanes().overlayMouseTarget.appendChild(d); }; HtmlMarker.prototype.draw = function(){ var pt = this.getProjection().fromLatLngToDivPixel(this.pos); if (pt && this.div){ this.div.style.left = pt.x + 'px'; this.div.style.top = pt.y + 'px'; } }; HtmlMarker.prototype.onRemove = function(){ if (this.div){ this.div.remove(); this.div = null; } }; var map = new google.maps.Map(mapEl, { center:{lat:HOME[0], lng:HOME[1]}, zoom:14, disableDefaultUI:true, zoomControl:true, fullscreenControl:true, gestureHandling:'cooperative', // leht kerib edasi; suumimiseks Ctrl + rullik / kaks sõrme clickableIcons:false, styles:[ {featureType:'poi', elementType:'labels', stylers:[{visibility:'off'}]}, // Google'i enda kohad peidetud {featureType:'poi.business', stylers:[{visibility:'off'}]}, {featureType:'transit', elementType:'labels.icon', stylers:[{visibility:'off'}]}, {featureType:'road', elementType:'labels.icon', stylers:[{visibility:'off'}]} ] }); M = { map:map, info:new google.maps.InfoWindow({ pixelOffset:new google.maps.Size(0,-18) }) }; M.info.addListener('closeclick', function(){ setActive(null); }); map.addListener('click', function(){ M.info.close(); setActive(null); }); // kauguseringid [1,3].forEach(function(r){ new google.maps.Circle({ map:map, center:{lat:HOME[0], lng:HOME[1]}, radius:r*1000, strokeColor:'#1F2A37', strokeOpacity:.35, strokeWeight:1.2, fillOpacity:0, clickable:false }); new HtmlMarker([HOME[0], HOME[1] + r/(111.32*Math.cos(HOME[0]*Math.PI/180))], '
'+r+' km
', '', null, 1).setMap(map); }); // kodu new HtmlMarker(HOME, '
'+ICON.home+'
'+T.home+'
', 'is-home', function(){ M.info.setContent('
'+T.home+'
'+T.homeSub+'
'); M.info.setPosition({lat:HOME[0], lng:HOME[1]}); M.info.open({map:map}); setActive(null); }, 1000).setMap(map); // objektid PLACES.forEach(function(p){ markers[p.id] = new HtmlMarker(p.ll, '
'+ICON[p.cat]+'
', '', function(){ openInfo(p); }, 10); }); render(false); // algvaade: kodu + Viljandi kesklinn var b = new google.maps.LatLngBounds(); [HOME, [58.3585,25.5900], [58.3700,25.5830]].forEach(function(ll){ b.extend({lat:ll[0], lng:ll[1]}); }); map.fitBounds(b, padding()); } /* ---------------- Google Maps API laadimine ---------------- */ window.gm_authFailure = function(){ showError('auth'); }; if (!LIIVA_GOOGLE_MAPS_KEY || LIIVA_GOOGLE_MAPS_KEY.indexOf('KLEEBI') === 0){ showError('nokey'); return; } function boot(){ var libs = google.maps.importLibrary ? Promise.all([google.maps.importLibrary('maps'), google.maps.importLibrary('core')]) : Promise.resolve(); libs.then(initMap).catch(function(e){ showError('js', e && e.message ? e.message : e); }); } if (window.google && window.google.maps){ boot(); return; } window.__liivaMapBoot = boot; var s = document.createElement('script'); s.src = 'https://maps.googleapis.com/maps/api/js?key=' + encodeURIComponent(LIIVA_GOOGLE_MAPS_KEY) + '&callback=__liivaMapBoot&loading=async&v=weekly&region=EE&language=' + (EN ? 'en' : 'et'); s.async = true; s.onerror = function(){ showError('load'); }; document.head.appendChild(s); })();

Peetrimõisa – just outside Viljandi

Peetrimõisa combines the best of both worlds – proximity to the town of Viljandi and a more peaceful living environment outside the city center.

Liiva põik 1 is situated in a new development area, characterized by more openness and a homely atmosphere. At the same time, Viljandi city center, the lake, the Castle Hills, and city services remain close by.

Viljandi is nearby

Viljandi offers everything needed for daily life – shops, schools, kindergartens, culture, and leisure opportunities. Additionally, the town is known for its historic old town, the lake, the Castle Hills, and its rich cultural life.

With Liiva põik 1, there is no need to choose between the city and a more peaceful living environment. Both are close at hand.

Liiva Ridaelamud