{"id":338,"date":"2015-11-24T18:40:49","date_gmt":"2015-11-24T17:40:49","guid":{"rendered":"http:\/\/serveiseducatius.xtec.cat\/osona\/?page_id=338"},"modified":"2026-02-05T13:35:40","modified_gmt":"2026-02-05T12:35:40","slug":"centres-educatius","status":"publish","type":"page","link":"https:\/\/serveiseducatius.xtec.cat\/osona\/comunitat\/centres-educatius\/","title":{"rendered":"Centres educatius"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"ca\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Mapa de Centres Educatius<\/title>\n    <script src=\"https:\/\/cdn.tailwindcss.com\"><\/script>\n    <!-- Leaflet CSS -->\n    <link rel=\"stylesheet\" href=\"https:\/\/unpkg.com\/leaflet@1.9.4\/dist\/leaflet.css\" \/>\n    <style>\n        #map { height: 600px; width: 100%; border-radius: 0.75rem; z-index: 1; }\n        .custom-popup .leaflet-popup-content-wrapper {\n            border-radius: 0.5rem;\n            padding: 0;\n            overflow: hidden;\n        }\n        .custom-popup .leaflet-popup-content {\n            margin: 0;\n            width: 280px !important;\n        }\n        select { max-width: 100%; }\n    <\/style>\n<\/head>\n<body class=\"bg-gray-50 p-4\">\n\n<div class=\"max-w-6xl mx-auto space-y-4\">\n    <!-- Header & Search -->\n    <div class=\"bg-white p-6 rounded-xl shadow-sm border border-gray-100\">\n        <h2 class=\"text-2xl font-bold text-gray-800 mb-4\">Cercador de Centres Educatius<\/h2>\n        \n        <div class=\"grid grid-cols-1 md:grid-cols-3 gap-4\">\n            <!-- Cercador de text -->\n            <div class=\"flex flex-col gap-1\">\n                <label class=\"text-xs font-semibold text-gray-500 uppercase ml-1\">Cerca lliure<\/label>\n                <input type=\"text\" id=\"searchInput\" placeholder=\"Nom, municipi o codi...\" \n                    class=\"px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:outline-none w-full\">\n            <\/div>\n\n            <!-- Filtre Natura -->\n            <div class=\"flex flex-col gap-1\">\n                <label class=\"text-xs font-semibold text-gray-500 uppercase ml-1\">Tipus de centre<\/label>\n                <select id=\"filterNature\" class=\"px-4 py-2 border border-gray-300 rounded-lg focus:outline-none w-full\">\n                    <option value=\"\">Tots els tipus<\/option>\n                    <option value=\"P\u00fablic\">P\u00fablic<\/option>\n                    <option value=\"Concertat\">Concertat<\/option>\n                    <option value=\"Privat\">Privat<\/option>\n                <\/select>\n            <\/div>\n\n            <!-- Selecci\u00f3 directa de centre -->\n            <div class=\"flex flex-col gap-1\">\n                <label class=\"text-xs font-semibold text-gray-500 uppercase ml-1\">Anar al centre&#8230;<\/label>\n                <select id=\"centerSelect\" class=\"px-4 py-2 border border-blue-300 bg-blue-50 rounded-lg focus:outline-none w-full font-medium\">\n                    <option value=\"\">Llista de centres filtrats&#8230;<\/option>\n                <\/select>\n            <\/div>\n        <\/div>\n    <\/div>\n\n    <!-- Map Container -->\n    <div class=\"relative\">\n        <div id=\"map\" class=\"shadow-lg border border-gray-200\"><\/div>\n        \n        <!-- Legend Overlay -->\n        <div class=\"absolute bottom-4 left-4 z-[1000] bg-white\/90 backdrop-blur-sm p-3 rounded-lg shadow-md border border-gray-200 text-sm\">\n            <div class=\"flex items-center gap-2 mb-1\">\n                <span class=\"w-3 h-3 rounded-full bg-blue-600\"><\/span> <span>P\u00fablic<\/span>\n            <\/div>\n            <div class=\"flex items-center gap-2 mb-1\">\n                <span class=\"w-3 h-3 rounded-full bg-orange-500\"><\/span> <span>Concertat<\/span>\n            <\/div>\n            <div class=\"flex items-center gap-2\">\n                <span class=\"w-3 h-3 rounded-full bg-purple-500\"><\/span> <span>Privat<\/span>\n            <\/div>\n        <\/div>\n    <\/div>\n\n    <div id=\"resultsCount\" class=\"text-sm text-gray-500 font-medium px-2\">\n        Processant dades&#8230;\n    <\/div>\n<\/div>\n\n<!-- Leaflet JS -->\n<script src=\"https:\/\/unpkg.com\/leaflet@1.9.4\/dist\/leaflet.js\"><\/script>\n\n<script>\n    \/\/ Dades completes amb les noves categories\n    const centers = [\n        { id: \"08000359\", name: \"Escola La Muntanya\", type: \"P\u00fablic\", address: \"Carrer Nostra Senyora de N\u00faria, s\/n\", pc: \"08591\", phone: \"938440179\", town: \"Aiguafreda\", lat: 41.7686, lng: 2.25139, email: \"a8000359@xtec.cat\" },\n        { id: \"08000086\", name: \"Escola La Forja - ZER Alt Llu\u00e7an\u00e8s\", type: \"P\u00fablic\", address: \"ctra. Llu\u00e7anesa, 8\", pc: \"08589\", phone: \"938527007\", town: \"Alpens\", lat: 42.12045, lng: 2.1009564, email: \"a8000086@xtec.cat\" },\n        { id: \"08015193\", name: \"Escola Sant Marc\", type: \"P\u00fablic\", address: \"c. Joan Fuster, s\/n\", pc: \"08506\", phone: \"938862793\", town: \"Calldetenes\", lat: 41.92398, lng: 2.2864564, email: \"a8015193@xtec.cat\" },\n        { id: \"08015201\", name: \"L'Estel\", type: \"Concertat\", address: \"c. Jaume I El Conqueridor, 19\", pc: \"08500\", phone: \"938863355\", town: \"Vic\", lat: 41.93272, lng: 2.256831, email: \"a8015201@xtec.cat\" },\n        { id: \"08016185\", name: \"Escola Ildefons Cerd\u00e0\", type: \"P\u00fablic\", address: \"av. Pere Barnils, s\/n\", pc: \"08540\", phone: \"938810804\", town: \"Centelles\", lat: 41.80234, lng: 2.215739, email: \"a8016185@xtec.cat\" },\n        { id: \"08016203\", name: \"Vedruna Sagrats Cors Centelles\", type: \"Concertat\", address: \"c. Hospital, 11\", pc: \"08540\", phone: \"938810261\", town: \"Centelles\", lat: 41.79824, lng: 2.219983, email: \"a8016203@xtec.cat\" },\n        { id: \"08018029\", name: \"Escola Les Escoles\", type: \"P\u00fablic\", address: \"c. Vall\u00e8s, s\/n\", pc: \"08503\", phone: \"938861056\", town: \"Gurb\", lat: 41.94709, lng: 2.241073, email: \"a8018029@xtec.cat\" },\n        { id: \"08019861\", name: \"Escola Gafarr\u00f3 - ZER Alt Llu\u00e7an\u00e8s\", type: \"P\u00fablic\", address: \"c. Rourets, s\/n\", pc: \"08514\", phone: \"938554054\", town: \"Llu\u00e7\u00e0\", lat: 42.06822, lng: 2.073769, email: \"a8019861@xtec.cat\" },\n        { id: \"08019940\", name: \"Escola Puig-Agut\", type: \"P\u00fablic\", address: \"c. Bellfort, 12\", pc: \"08560\", phone: \"938511330\", town: \"Manlleu\", lat: 42.00539, lng: 2.285377, email: \"a8019940@xtec.cat\" },\n        { id: \"08019952\", name: \"La Salle Manlleu\", type: \"Concertat\", address: \"c. Enric Delaris, 68\", pc: \"08560\", phone: \"938506064\", town: \"Manlleu\", lat: 41.99781, lng: 2.282877, email: \"a8019952@xtec.cat\" },\n        { id: \"08019976\", name: \"Vedruna Manlleu\", type: \"Concertat\", address: \"c. Bisbe Morgadas, 4\", pc: \"08560\", phone: \"938510180\", town: \"Manlleu\", lat: 41.99923, lng: 2.284107, email: \"a8019976@xtec.cat\" },\n        { id: \"08020701\", name: \"Escola Comtes de Lacambra\", type: \"P\u00fablic\", address: \"c. Esperan\u00e7a, 3\", pc: \"08509\", phone: \"938592829\", town: \"Les Masies de Voltreg\u00e0\", lat: 42.04175, lng: 2.231376, email: \"a8020701@xtec.cat\" },\n        { id: \"08021961\", name: \"Escola El Rocal\", type: \"P\u00fablic\", address: \"c. Pla\u00e7ola, s\/n\", pc: \"08585\", phone: \"938551157\", town: \"Montesquiu\", lat: 42.11053, lng: 2.209326, email: \"a8021961@xtec.cat\" },\n        { id: \"08022495\", name: \"Escola Terra Nostra\", type: \"P\u00fablic\", address: \"av. de l'Esport, 1\", pc: \"08516\", phone: \"938880941\", town: \"Olost\", lat: 41.98468, lng: 2.100915, email: \"a8022495@xtec.cat\" },\n        { id: \"08022549\", name: \"Escola Llevant - ZER Gavarresa\", type: \"P\u00fablic\", address: \"pl. Catalunya, s\/n\", pc: \"08518\", phone: \"938128036\", town: \"Orist\u00e0\", lat: 41.93308, lng: 2.059273, email: \"a8022549@xtec.cat\" },\n        { id: \"08023189\", name: \"FEDAC-Prats\", type: \"Concertat\", address: \"c. Escoles, 2\", pc: \"08513\", phone: \"938560229\", town: \"Prats de Llu\u00e7an\u00e8s\", lat: 42.00983, lng: 2.029419, email: \"a8023189@xtec.cat\" },\n        { id: \"08023207\", name: \"Escola Llu\u00e7an\u00e8s\", type: \"P\u00fablic\", address: \"c. Mateu Garreta, 11\", pc: \"08513\", phone: \"937060021\", town: \"Prats de Llu\u00e7an\u00e8s\", lat: 42.01504, lng: 2.031949, email: \"a8023207@xtec.cat\" },\n        { id: \"08023669\", name: \"Escola Mare de D\u00e9u del S\u00f2l del Pont\", type: \"P\u00fablic\", address: \"c. Escoles, s\/n\", pc: \"08510\", phone: \"938540955\", town: \"Roda de Ter\", lat: 41.98039, lng: 2.306037, email: \"a8023669@xtec.cat\" },\n        { id: \"08025320\", name: \"Escola La Monjoia\", type: \"P\u00fablic\", address: \"c. Tres Creus, 2\", pc: \"08519\", phone: \"938889125\", town: \"Sant Bartomeu del Grau\", lat: 41.98038, lng: 2.177648, email: \"a8025320@xtec.cat\" },\n        { id: \"08025666\", name: \"Escola Aurora - ZER Alt Llu\u00e7an\u00e8s\", type: \"P\u00fablic\", address: \"c. de Sant Roc\", pc: \"08589\", phone: \"938578200\", town: \"Sant Boi de Llu\u00e7an\u00e8s\", lat: 42.0607, lng: 2.153099, email: \"a8025666@xtec.cat\" },\n        { id: \"08026543\", name: \"Mare de D\u00e9u de la Gleva\", type: \"Concertat\", address: \"La Gleva\", pc: \"08512\", phone: \"938570106\", town: \"Les Masies de Voltreg\u00e0\", lat: 42.00346, lng: 2.240308, email: \"a8026543@xtec.cat\" },\n        { id: \"08026786\", name: \"Escola Bellpuig\", type: \"P\u00fablic\", address: \"c. Calldetenes, 9\", pc: \"08504\", phone: \"938887701\", town: \"Sant Juli\u00e0 de Vilatorta\", lat: 41.92655, lng: 2.323203, email: \"a8026786@xtec.cat\" },\n        { id: \"08026798\", name: \"El Roser\", type: \"Concertat\", address: \"pg. Puig i Cu\u00f1er, s\/n\", pc: \"08514\", phone: \"938122244\", town: \"Sant Juli\u00e0 de Vilatorta\", lat: 41.92861, lng: 2.318704, email: \"a8026798@xtec.cat\" },\n        { id: \"08027249\", name: \"Escola Segimon Comas\", type: \"P\u00fablic\", address: \"c. Mestre Quer, 11\", pc: \"08580\", phone: \"938550397\", town: \"Sant Quirze de Besora\", lat: 42.10208, lng: 2.216395, email: \"a8027249@xtec.cat\" },\n        { id: \"08028059\", name: \"Escola Jacint Verdaguer\", type: \"P\u00fablic\", address: \"c. Escoles, s\/n\", pc: \"08507\", phone: \"938833150\", town: \"Santa Eug\u00e8nia de Berga\", lat: 41.90155, lng: 2.285389, email: \"a8028059@xtec.cat\" },\n        { id: \"08028072\", name: \"Escola El Roure Gros\", type: \"P\u00fablic\", address: \"c. Jaume Balmes, 3\", pc: \"08505\", phone: \"938830101\", town: \"Santa Eul\u00e0lia de Riuprimer\", lat: 41.90982, lng: 2.189084, email: \"a8028072@xtec.cat\" },\n        { id: \"08028709\", name: \"Escola Lloriana\", type: \"P\u00fablic\", address: \"ctra. de Vila-seca, s\/n\", pc: \"08571\", phone: \"938593992\", town: \"Sant Vicen\u00e7 de Torell\u00f3\", lat: 42.06244, lng: 2.263955, email: \"a8028709@xtec.cat\" },\n        { id: \"08029027\", name: \"Escola Farigola\", type: \"P\u00fablic\", address: \"c. dels Esports, s\/n\", pc: \"08553\", phone: \"938841075\", town: \"Seva\", lat: 41.83592, lng: 2.280932, email: \"a8029027@xtec.cat\" },\n        { id: \"08029283\", name: \"Escola El Gurri\", type: \"P\u00fablic\", address: \"c. Ramon Llull\", pc: \"08552\", phone: \"938800407\", town: \"Taradell\", lat: 41.88145, lng: 2.258649, email: \"a8029283@xtec.cat\" },\n        { id: \"08029301\", name: \"Escola Les Pinediques\", type: \"P\u00fablic\", address: \"pg. de les Pinediques, s\/n\", pc: \"08552\", phone: \"938800214\", town: \"Taradell\", lat: 41.8649, lng: 2.291358, email: \"a8029301@xtec.cat\" },\n        { id: \"08029313\", name: \"Sant Gen\u00eds-Santa Agn\u00e8s\", type: \"Concertat\", address: \"p. de la Rectoria, 2\", pc: \"08552\", phone: \"938126015\", town: \"Taradell\", lat: 41.87598, lng: 2.28543, email: \"a8029313@xtec.cat\" },\n        { id: \"08030421\", name: \"Escola L'Era de Dalt\", type: \"P\u00fablic\", address: \"c. Andreu Molera, 5\", pc: \"08551\", phone: \"938870901\", town: \"Tona\", lat: 41.8461, lng: 2.228526, email: \"a8030421@xtec.cat\" },\n        { id: \"08030431\", name: \"Vedruna Tona\", type: \"Concertat\", address: \"c. Germana Vict\u00f2ria, 21\", pc: \"08551\", phone: \"938124762\", town: \"Tona\", lat: 41.8514, lng: 2.225797, email: \"a8030431@xtec.cat\" },\n        { id: \"08030510\", name: \"Escola Doctor Forti\u00e0 i Sol\u00e0\", type: \"P\u00fablic\", address: \"av. Pompeu Fabra, 6\", pc: \"08570\", phone: \"938590251\", town: \"Torell\u00f3\", lat: 42.04841, lng: 2.266407, email: \"a8030510@xtec.cat\" },\n        { id: \"08030522\", name: \"Escola Vall del Ges\", type: \"P\u00fablic\", address: \"c. Catalunya, 1\", pc: \"08570\", phone: \"938593941\", town: \"Torell\u00f3\", lat: 42.05012, lng: 2.254069, email: \"a8030522@xtec.cat\" },\n        { id: \"08030534\", name: \"Rocaprevera\", type: \"Concertat\", address: \"c. Estudis, 7\", pc: \"08570\", phone: \"938590630\", town: \"Torell\u00f3\", lat: 42.04788, lng: 2.265479, email: \"a8030534@xtec.cat\" },\n        { id: \"08030546\", name: \"Vedruna Sagrats Cors Torell\u00f3\", type: \"Concertat\", address: \"c. Puig d'Assalit, 32\", pc: \"08570\", phone: \"938590490\", town: \"Torell\u00f3\", lat: 42.04807, lng: 2.267944, email: \"a8030546@xtec.cat\" },\n        { id: \"08030819\", name: \"Escola Sentfores\", type: \"P\u00fablic\", address: \"c. Pla del Maset, 5\", pc: \"08505\", phone: \"938853420\", town: \"Vic\", lat: 41.91322, lng: 2.230518, email: \"a8030819@xtec.cat\" },\n        { id: \"08030881\", name: \"Dominiques Vic\", type: \"Concertat\", address: \"pl. Catedral, 2\", pc: \"08500\", phone: \"938832552\", town: \"Vic\", lat: 41.92818, lng: 2.25471, email: \"a8030881@xtec.cat\" },\n        { id: \"08030911\", name: \"Sagrat Cor de Jes\u00fas\", type: \"Concertat\", address: \"pg. Generalitat, 13\", pc: \"08500\", phone: \"938851194\", town: \"Vic\", lat: 41.92399, lng: 2.253683, email: \"a8030911@xtec.cat\" },\n        { id: \"08030947\", name: \"Vedruna Escorial Vic\", type: \"Concertat\", address: \"c. Santa Joaquima de Vedruna, 6\", pc: \"08500\", phone: \"938863612\", town: \"Vic\", lat: 41.93007, lng: 2.259566, email: \"a8030947@xtec.cat\" },\n        { id: \"08030959\", name: \"Sant Miquel dels Sants\", type: \"Concertat\", address: \"c. Jaume I, 11\", pc: \"08500\", phone: \"938861244\", town: \"Vic\", lat: 41.93306, lng: 2.25565, email: \"a8030959@xtec.cat\" },\n        { id: \"08030960\", name: \"FEDAC-Vic\", type: \"Concertat\", address: \"c. Pare Coll, 15\", pc: \"08500\", phone: \"938893351\", town: \"Vic\", lat: 41.93328, lng: 2.253669, email: \"a8030960@xtec.cat\" },\n        { id: \"08031009\", name: \"Escola Doctor Joaquim Salarich\", type: \"P\u00fablic\", address: \"av. Rafael Casanova, 33\", pc: \"08500\", phone: \"938851329\", town: \"Vic\", lat: 41.91467, lng: 2.256945, email: \"a8031009@xtec.cat\" },\n        { id: \"08031022\", name: \"Institut de Vic\", type: \"P\u00fablic\", address: \"av. Sant Bernat Calb\u00f3, 8\", pc: \"08500\", phone: \"938891878\", town: \"Vic\", lat: 41.93479, lng: 2.258918, email: \"a8031022@xtec.cat\" },\n        { id: \"08031034\", name: \"Institut Jaume Call\u00eds\", type: \"P\u00fablic\", address: \"av. Ol\u00edmpia, 2\", pc: \"08500\", phone: \"938852017\", town: \"Vic\", lat: 41.93337, lng: 2.24092, email: \"a8031034@xtec.cat\" },\n        { id: \"08031290\", name: \"Escola Les Roques\", type: \"P\u00fablic\", address: \"c. Escoles, s\/n\", pc: \"08519\", phone: \"938847005\", town: \"Vilanova de Sau\", lat: 41.94506, lng: 2.383603, email: \"a8031290@xtec.cat\" },\n        { id: \"08032154\", name: \"EFA Quintanes\", type: \"Concertat\", address: \"Mas Quintanes, s\/n\", pc: \"08508\", phone: \"938502441\", town: \"Les Masies de Voltreg\u00e0\", lat: 42.03452, lng: 2.206278, email: \"a8032154@xtec.cat\" },\n        { id: \"08034795\", name: \"Escola Heurom - ZER Alt Llu\u00e7an\u00e8s\", type: \"P\u00fablic\", address: \"ctra. La Vella, s\/n\", pc: \"08589\", phone: \"938530202\", town: \"Perafita\", lat: 42.04242, lng: 2.109128, email: \"a8034795@xtec.cat\" },\n        { id: \"08035003\", name: \"EA de Vic\", type: \"P\u00fablic\", address: \"rbla. Sant Dom\u00e8nec, 24\", pc: \"08500\", phone: \"938854851\", town: \"Vic\", lat: 41.92709, lng: 2.25367, email: \"a8035003@xtec.cat\" },\n        { id: \"08038201\", name: \"Escola La Baumeta - ZER Els Castells\", type: \"P\u00fablic\", address: \"Pla\u00e7a Major, s\/n\", pc: \"08589\", phone: \"938550558\", town: \"Santa Maria de Besora\", lat: 42.12683, lng: 2.257697, email: \"a8038201@xtec.cat\" },\n        { id: \"08039215\", name: \"Casals-Gr\u00e0cia\", type: \"Concertat\", address: \"c. Voltreg\u00e0, 101\", pc: \"08560\", phone: \"938507398\", town: \"Manlleu\", lat: 42.00146, lng: 2.275022, email: \"a8039215@xtec.cat\" },\n        { id: \"08039628\", name: \"Escola Pompeu Fabra\", type: \"P\u00fablic\", address: \"c. Pompeu Fabra, 34-38\", pc: \"08560\", phone: \"938513702\", town: \"Manlleu\", lat: 42.00298, lng: 2.296916, email: \"a8039628@xtec.cat\" },\n        { id: \"08039631\", name: \"Escola L'Agullola\", type: \"P\u00fablic\", address: \"pl. Major, s\/n\", pc: \"08569\", phone: \"938522023\", town: \"Rupit i Pruit\", lat: 42.02337, lng: 2.464812, email: \"a8039631@xtec.cat\" },\n        { id: \"08040552\", name: \"Institut Antoni Pous i Argila\", type: \"P\u00fablic\", address: \"av. Roma, 260\", pc: \"08560\", phone: \"938513705\", town: \"Manlleu\", lat: 42.00256, lng: 2.274704, email: \"a8040552@xtec.cat\" },\n        { id: \"08041714\", name: \"Escola Les Basseroles\", type: \"P\u00fablic\", address: \"c. Escoles, s\/n\", pc: \"08554\", phone: \"938871203\", town: \"Seva\", lat: 41.84049, lng: 2.248862, email: \"a8041714@xtec.cat\" },\n        { id: \"08044569\", name: \"Institut Pere Barnils\", type: \"P\u00fablic\", address: \"av. Pere Barnils, s\/n\", pc: \"08540\", phone: \"938812752\", town: \"Centelles\", lat: 41.80194, lng: 2.216448, email: \"a8044569@xtec.cat\" },\n        { id: \"08047637\", name: \"Escola de Dansa Thais\", type: \"Privat\", address: \"c. de la Ind\u00fastria, 34\", pc: \"08500\", phone: \"636544832\", town: \"Vic\", lat: 41.92987, lng: 2.262975, email: \"a8047637@xtec.cat\" },\n        { id: \"08050259\", name: \"LLI privada Sol Solet\", type: \"Privat\", address: \"c. Girona, 42\", pc: \"08560\", phone: \"938510377\", town: \"Manlleu\", lat: 42.00499, lng: 2.280856, email: \"a8050259@xtec.cat\" },\n        { id: \"08053005\", name: \"Institut Castell de Quer\", type: \"P\u00fablic\", address: \"c. Mateu Garreta, s\/n\", pc: \"08513\", phone: \"938560506\", town: \"Prats de Llu\u00e7an\u00e8s\", lat: 42.01503, lng: 2.032036, email: \"a8053005@xtec.cat\" },\n        { id: \"08053042\", name: \"Institut Miquel Mart\u00ed i Pol\", type: \"P\u00fablic\", address: \"av. Miquel Mart\u00ed i Pol, 1-3\", pc: \"08510\", phone: \"938500244\", town: \"Roda de Ter\", lat: 41.98595, lng: 2.305424, email: \"a8053042@xtec.cat\" },\n        { id: \"08053121\", name: \"Institut Taradell\", type: \"P\u00fablic\", address: \"c. Pompeu Fabra, 12\", pc: \"08552\", phone: \"938800012\", town: \"Taradell\", lat: 41.87248, lng: 2.288748, email: \"a8053121@xtec.cat\" },\n        { id: \"08054277\", name: \"Institut de Tona\", type: \"P\u00fablic\", address: \"c. Torres i Bages, 32\", pc: \"08551\", phone: \"938125723\", town: \"Tona\", lat: 41.84623, lng: 2.223244, email: \"a8054277@xtec.cat\" },\n        { id: \"08057096\", name: \"Escola Guillem de Mont-rodon\", type: \"P\u00fablic\", address: \"c. de Sant Miquel Xic, 2\", pc: \"08500\", phone: \"938861541\", town: \"Vic\", lat: 41.93666, lng: 2.264461, email: \"a8057096@xtec.cat\" },\n        { id: \"08057102\", name: \"Escola Andersen\", type: \"P\u00fablic\", address: \"av. Ol\u00edmpia, s\/n\", pc: \"08500\", phone: \"938851795\", town: \"Vic\", lat: 41.93336, lng: 2.233339, email: \"a8057102@xtec.cat\" },\n        { id: \"08058404\", name: \"Institut Cirvi\u00e0num de Torell\u00f3\", type: \"P\u00fablic\", address: \"c. Ausi\u00e0s March\", pc: \"08570\", phone: \"938594841\", town: \"Torell\u00f3\", lat: 42.05464, lng: 2.26415, email: \"a8058404@xtec.cat\" },\n        { id: \"08058428\", name: \"Institut Bisaura\", type: \"P\u00fablic\", address: \"c. Mestre Quer, 13\", pc: \"08580\", phone: \"938550816\", town: \"Sant Quirze de Besora\", lat: 42.10239, lng: 2.216022, email: \"a8058428@xtec.cat\" },\n        { id: \"08058544\", name: \"LLI privada Mare Teresa Gallifa\", type: \"Privat\", address: \"c. Marqu\u00e8s de Palmerola, 24\", pc: \"08512\", phone: \"938270377\", town: \"Sant Hip\u00f2lit de Voltreg\u00e0\", lat: 42.01541, lng: 2.237774, email: \"a8058544@xtec.cat\" },\n        { id: \"08060095\", name: \"CFA Montseny\", type: \"P\u00fablic\", address: \"av. Montseny, 16\", pc: \"08500\", phone: \"938851777\", town: \"Vic\", lat: 41.92042, lng: 2.247556, email: \"a8060095@xtec.cat\" },\n        { id: \"08060964\", name: \"Escola Quatre Vents\", type: \"P\u00fablic\", address: \"av. Pirineus, 19\", pc: \"08560\", phone: \"938512511\", town: \"Manlleu\", lat: 42.00802, lng: 2.277624, email: \"a8060964@xtec.cat\" },\n        { id: \"08060976\", name: \"Institut del Voltregan\u00e8s\", type: \"P\u00fablic\", address: \"c. Matagalls, 48\", pc: \"08508\", phone: \"938572672\", town: \"Les Masies de Voltreg\u00e0\", lat: 42.01007, lng: 2.243855, email: \"a8060976@xtec.cat\" },\n        { id: \"08062183\", name: \"EOI Osona\", type: \"P\u00fablic\", address: \"c. Pla de Baleny\u00e0, 30-32\", pc: \"08500\", phone: \"938893830\", town: \"Vic\", lat: 41.93217, lng: 2.253137, email: \"a8062183@xtec.cat\" },\n        { id: \"08062870\", name: \"Institut La Plana\", type: \"P\u00fablic\", address: \"c. Rector de Vallfogona, 65\", pc: \"08500\", phone: \"938834851\", town: \"Vic\", lat: 41.92233, lng: 2.263001, email: \"a8062870@xtec.cat\" },\n        { id: \"08063060\", name: \"HDA Hospital de Dia de Vic\", type: \"P\u00fablic\", address: \"c. Sant Miquel Xic, 2\", pc: \"08500\", phone: \"937027787\", town: \"Vic\", lat: 41.9366, lng: 2.260211, email: \"a8063060@xtec.cat\" },\n        { id: \"08063621\", name: \"CFA Mart\u00ed i Pol\", type: \"P\u00fablic\", address: \"av. Roma, 260\", pc: \"08560\", phone: \"938506500\", town: \"Manlleu\", lat: 42.00818, lng: 2.288473, email: \"a8063621@xtec.cat\" },\n        { id: \"08063643\", name: \"CFA La Cooperativa\", type: \"P\u00fablic\", address: \"c. Enric Prat de la Riba, 17\", pc: \"08570\", phone: \"938505313\", town: \"Torell\u00f3\", lat: 42.04865, lng: 2.264947, email: \"a8063643@xtec.cat\" },\n        { id: \"08063837\", name: \"Institut Les Margues\", type: \"P\u00fablic\", address: \"av. de Francesc Maci\u00e0, 14\", pc: \"08506\", phone: \"938867116\", town: \"Calldetenes\", lat: 41.92432, lng: 2.289273, email: \"a8063837@xtec.cat\" },\n        { id: \"08063928\", name: \"Escola Muntanyola\", type: \"P\u00fablic\", address: \"c. dels esports, s\/n\", pc: \"08519\", phone: \"938136091\", town: \"Muntanyola\", lat: 41.87174, lng: 2.183918, email: \"a8063928@xtec.cat\" },\n        { id: \"08064787\", name: \"Escola Emili Teixidor\", type: \"P\u00fablic\", address: \"c. dels P\u00e8lics, 20\", pc: \"08510\", phone: \"938540332\", town: \"Roda de Ter\", lat: 41.98665, lng: 2.31459, email: \"a8064787@xtec.cat\" },\n        { id: \"08064829\", name: \"Escola Valldeneu\", type: \"P\u00fablic\", address: \"c. de Sant Jaume\", pc: \"08592\", phone: \"938441740\", town: \"Sant Mart\u00ed de Centelles\", lat: 41.76319, lng: 2.250814, email: \"a8064829@xtec.cat\" },\n        { id: \"08065627\", name: \"Esc. de M\u00fasica del Llu\u00e7an\u00e8s\", type: \"Privat\", address: \"c. Mateu Garreta, s\/n\", pc: \"08513\", phone: \"938560100\", town: \"Prats de Llu\u00e7an\u00e8s\", lat: 42.01506, lng: 2.032213, email: \"a8065627@xtec.cat\" },\n        { id: \"08067041\", name: \"Escola Xoriguer\", type: \"P\u00fablic\", address: \"c. dels Casals, s\/n\", pc: \"08540\", phone: \"938813245\", town: \"Centelles\", lat: 41.79939, lng: 2.224353, email: \"a8067041@xtec.cat\" },\n        { id: \"08067818\", name: \"Escola La S\u00ednia\", type: \"P\u00fablic\", address: \"av. Pa\u00efsos Catalans, 44\", pc: \"08500\", phone: \"938834342\", town: \"Vic\", lat: 41.91743, lng: 2.251451, email: \"a8067818@xtec.cat\" },\n        { id: \"08068380\", name: \"Institut Gurb\", type: \"P\u00fablic\", address: \"c. de l'Olivera, 1\", pc: \"08503\", phone: \"938897572\", town: \"Gurb\", lat: 41.93868, lng: 2.234864, email: \"a8068380@xtec.cat\" },\n        { id: \"08069499\", name: \"Escola Vic-centre\", type: \"P\u00fablic\", address: \"c. de Joan Pau II, 3\", pc: \"08500\", phone: \"938857266\", town: \"Vic\", lat: 41.92628, lng: 2.253551, email: \"a8069499@xtec.cat\" },\n        { id: \"08071408\", name: \"El Seminari\", type: \"Concertat\", address: \"rda. Francesc Camprodon, 2\", pc: \"08500\", phone: \"938861555\", town: \"Vic\", lat: 41.93464, lng: 2.256862, email: \"a8071408@xtec.cat\" },\n        { id: \"08072176\", name: \"Institut del Ter\", type: \"P\u00fablic\", address: \"c. Eduard Rif\u00e0, 24\", pc: \"08560\", phone: \"938512312\", town: \"Manlleu\", lat: 42.00499, lng: 2.292776, email: \"a8072176@xtec.cat\" },\n        { id: \"08073788\", name: \"La Font\", type: \"Privat\", address: \"rda. Camprodon, 2\", pc: \"08500\", phone: \"695788133\", town: \"Vic\", lat: 41.93465, lng: 2.256701, email: \"a8073788@xtec.cat\" },\n        { id: \"08074318\", name: \"Tekn\u00f3s\", type: \"Privat\", address: \"c. Bisbe Morgades, 15\", pc: \"08500\", phone: \"938815531\", town: \"Vic\", lat: 41.92934, lng: 2.251074, email: \"a8074318@xtec.cat\" },\n        { id: \"08074379\", name: \"Tangram\", type: \"Concertat\", address: \"av. Puigmal, 60-62\", pc: \"08560\", phone: \"938510882\", town: \"Manlleu\", lat: 42.00577, lng: 2.28885, email: \"a8074379@xtec.cat\" },\n        { id: \"08075153\", name: \"Escola de Dansa Laia Baulenas\", type: \"Privat\", address: \"c. de Sant Jordi, 92\", pc: \"08500\", phone: \"0\", town: \"Vic\", lat: 41.93448, lng: 2.266036, email: \"a8075153@xtec.cat\" },\n        { id: \"08075256\", name: \"Institut Escola Marta Mata\", type: \"P\u00fablic\", address: \"av. del Castell, 42\", pc: \"08570\", phone: \"938594746\", town: \"Torell\u00f3\", lat: 42.05637, lng: 2.261129, email: \"a8075256@xtec.cat\" },\n        { id: \"08076959\", name: \"Institut Escola Carles Capdevila\", type: \"P\u00fablic\", address: \"c. Escoles, s\/n\", pc: \"08550\", phone: \"938898304\", town: \"Baleny\u00e0\", lat: 41.81704, lng: 2.237452, email: \"a8076959@xtec.cat\" },\n        { id: \"08076984\", name: \"Institut Escola Josep Maria Xandri\", type: \"P\u00fablic\", address: \"c. Jos\u00e9 Badrena, 13\", pc: \"08572\", phone: \"938584202\", town: \"Sant Pere de Torell\u00f3\", lat: 42.07634, lng: 2.294699, email: \"a8076984@xtec.cat\" },\n        { id: \"08076996\", name: \"Institut Escola Mossen Cinto\", type: \"P\u00fablic\", address: \"pl. Roviretes, 1\", pc: \"08519\", phone: \"938122204\", town: \"Folgueroles\", lat: 41.940132, lng: 2.318412, email: \"a8076996@xtec.cat\" },\n        { id: \"08077113\", name: \"Escola Voltreg\u00e0\", type: \"P\u00fablic\", address: \"c. Balmes, 1\", pc: \"08512\", phone: \"938570162\", town: \"Sant Hip\u00f2lit de Voltreg\u00e0\", lat: 42.01215, lng: 2.238236, email: \"a8077113@xtec.cat\" },\n        { id: \"08077319\", name: \"Escola de Dansa Ma. Cinta\", type: \"Privat\", address: \"c. Josep Serra i Si\u00f3, 20\", pc: \"08560\", phone: \"0\", town: \"Manlleu\", lat: 41.99927, lng: 2.276106, email: \"a8077319@xtec.cat\" },\n        { id: \"08077320\", name: \"Escola de Dansa TLS\", type: \"Privat\", address: \"c. Costa d'en Paratge, 16\", pc: \"08500\", phone: \"608143868\", town: \"Vic\", lat: 41.9384, lng: 2.252168, email: \"a8077320@xtec.cat\" },\n        { id: \"08078002\", name: \"Tekn\u00f3s_UManlleu\", type: \"Privat\", address: \"c. Baixa Cortada, 1\", pc: \"08560\", phone: \"0\", town: \"Manlleu\", lat: 41.00067, lng: 2.282864, email: \"a8078002@xtec.cat\" },\n        { id: \"08078075\", name: \"Escola de Dansa Dansa't del Ges\", type: \"Privat\", address: \"c. Sant Antoni, 30\", pc: \"08570\", phone: \"0\", town: \"Torell\u00f3\", lat: 42.04839, lng: 2.261232, email: \"a8078075@xtec.cat\" },\n        { id: \"08078439\", name: \"Institut Escola El Cabrer\u00e8s\", type: \"P\u00fablic\", address: \"c. Pedr\u00f3, 11\", pc: \"08511\", phone: \"938568080\", town: \"L'Esquirol\", lat: 42.03296, lng: 2.369291, email: \"a8078439@xtec.cat\" },\n        { id: \"08078701\", name: \"Escola de Dansa Tempoballet\", type: \"Privat\", address: \"c. de l'Era d'en Selles, 9\", pc: \"08500\", phone: \"0\", town: \"Vic\", lat: 41.93432, lng: 2.250314, email: \"a8078701@xtec.cat\" },\n        { id: \"08079195\", name: \"CEES VIC\", type: \"Privat\", address: \"p\u00e7a. del Mil\u00b7lenari, 2\", pc: \"08500\", phone: \"0\", town: \"Vic\", lat: 41.933609, lng: 2.249864, email: \"a8079195@xtec.cat\" },\n        { id: \"08079237\", name: \"C.G.Sup.Art Dra de Vic\", type: \"Privat\", address: \"c. Torras i Bages, 6\", pc: \"08500\", phone: \"621185652\", town: \"Vic\", lat: 41.929066, lng: 2.259901, email: \"a8079237@xtec.cat\" },\n        { id: \"17004062\", name: \"Escola Santa B\u00e0rbara - ZER Els Castells\", type: \"P\u00fablic\", address: \"ctra. de Ciuret\", pc: \"17515\", phone: \"938551277\", town: \"Vidr\u00e0\", lat: 42.12437, lng: 2.31233, email: \"b7004062@xtec.cat\" },\n        { id: \"17004189\", name: \"Escola Els Castanyers - ZER Guilleries\", type: \"P\u00fablic\", address: \"ptge. Pomaret, s\/n\", pc: \"17406\", phone: \"938848087\", town: \"Viladrau\", lat: 41.84995, lng: 2.383246, email: \"b7004189@xtec.cat\" }\n    ];\n\n    \/\/ Inicialitzaci\u00f3 del mapa\n    const map = L.map('map').setView([41.95, 2.25], 10);\n    L.tileLayer('https:\/\/{s}.basemaps.cartocdn.com\/light_all\/{z}\/{x}\/{y}{r}.png', {\n        attribution: '&copy; CARTO'\n    }).addTo(map);\n\n    const markerMap = {}; \n    const markerGroup = L.layerGroup().addTo(map);\n\n    function loadMarkers(filteredCenters) {\n        markerGroup.clearLayers();\n        const select = document.getElementById('centerSelect');\n        select.innerHTML = '<option value=\"\">Llista de centres filtrats...<\/option>';\n\n        filteredCenters.forEach(center => {\n            let color = '#2563eb'; \/\/ P\u00fablic\n            if (center.type === 'Concertat') color = '#f97316';\n            if (center.type === 'Privat') color = '#a855f7';\n\n            const markerHtml = `<div style=\"background-color: ${color}; width: 14px; height: 14px; border: 2px solid white; border-radius: 50%; box-shadow: 0 0 4px rgba(0,0,0,0.3);\"><\/div>`;\n\n            const marker = L.marker([center.lat, center.lng], {\n                icon: L.divIcon({\n                    html: markerHtml,\n                    className: '',\n                    iconSize: [14, 14],\n                    iconAnchor: [7, 7]\n                })\n            }).bindPopup(`\n                <div class=\"p-4 space-y-2\">\n                    <div class=\"flex items-center gap-2\">\n                        <span class=\"px-2 py-0.5 text-[10px] font-bold uppercase rounded-full \n                            ${center.type === 'P\u00fablic' ? 'bg-blue-100 text-blue-700' : (center.type === 'Concertat' ? 'bg-orange-100 text-orange-700' : 'bg-purple-100 text-purple-700')}\">\n                            ${center.type}\n                        <\/span>\n                        <span class=\"text-xs text-gray-400 font-mono\">${center.id}<\/span>\n                    <\/div>\n                    <h3 class=\"font-bold text-gray-900 leading-tight\">${center.name}<\/h3>\n                    <div class=\"text-sm text-gray-600\">\n                        <p class=\"flex items-start gap-1\">\n                            <svg class=\"w-4 h-4 mt-0.5 flex-shrink-0\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\"><path d=\"M17.657 16.657L13.414 20.9a2 2 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z\"\/><\/svg>\n                            <span>${center.address}, ${center.pc} <b>${center.town}<\/b><\/span>\n                        <\/p>\n                        <p class=\"mt-1\"><a href=\"tel:${center.phone}\" class=\"text-blue-600 hover:underline\">Tel: ${center.phone === \"0\" ? \"N\/D\" : center.phone}<\/a><\/p>\n                        <p><a href=\"mailto:${center.email}\" class=\"text-blue-600 hover:underline break-all\">${center.email}<\/a><\/p>\n                    <\/div>\n                <\/div>\n            `, { className: 'custom-popup' });\n\n            markerGroup.addLayer(marker);\n            markerMap[center.id] = marker; \n\n            const option = document.createElement('option');\n            option.value = center.id;\n            option.textContent = `${center.town} - ${center.name}`;\n            select.appendChild(option);\n        });\n        \n        document.getElementById('resultsCount').innerText = `S'han trobat ${filteredCenters.length} centres.`;\n    }\n\n    function filterData() {\n        const searchTerm = document.getElementById('searchInput').value.toLowerCase();\n        const natureFilter = document.getElementById('filterNature').value;\n\n        const filtered = centers.filter(c => {\n            const matchesSearch = c.name.toLowerCase().includes(searchTerm) || \n                                 c.town.toLowerCase().includes(searchTerm) || \n                                 c.id.includes(searchTerm);\n            const matchesNature = natureFilter === \"\" || c.type === natureFilter;\n            return matchesSearch && matchesNature;\n        });\n\n        loadMarkers(filtered);\n    }\n\n    document.getElementById('centerSelect').addEventListener('change', function(e) {\n        const centerId = e.target.value;\n        if (centerId && markerMap[centerId]) {\n            const marker = markerMap[centerId];\n            map.setView(marker.getLatLng(), 15); \n            marker.openPopup(); \n        }\n    });\n\n    document.getElementById('searchInput').addEventListener('input', filterData);\n    document.getElementById('filterNature').addEventListener('change', filterData);\n\n    loadMarkers(centers);\n<\/script>\n\n<\/body>\n<\/html>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mapa de Centres Educatius Cercador de Centres Educatius Cerca lliure Tipus de centre Tots els tipusP\u00fablicConcertatPrivat Anar al centre&#8230; Llista [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":341,"menu_order":10,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-338","page","type-page","status-publish","hentry"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/serveiseducatius.xtec.cat\/osona\/wp-json\/wp\/v2\/pages\/338","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/serveiseducatius.xtec.cat\/osona\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/serveiseducatius.xtec.cat\/osona\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/serveiseducatius.xtec.cat\/osona\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/serveiseducatius.xtec.cat\/osona\/wp-json\/wp\/v2\/comments?post=338"}],"version-history":[{"count":6,"href":"https:\/\/serveiseducatius.xtec.cat\/osona\/wp-json\/wp\/v2\/pages\/338\/revisions"}],"predecessor-version":[{"id":12710,"href":"https:\/\/serveiseducatius.xtec.cat\/osona\/wp-json\/wp\/v2\/pages\/338\/revisions\/12710"}],"up":[{"embeddable":true,"href":"https:\/\/serveiseducatius.xtec.cat\/osona\/wp-json\/wp\/v2\/pages\/341"}],"wp:attachment":[{"href":"https:\/\/serveiseducatius.xtec.cat\/osona\/wp-json\/wp\/v2\/media?parent=338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}