{"id":625,"date":"2025-07-15T11:59:30","date_gmt":"2025-07-15T10:59:30","guid":{"rendered":"https:\/\/www.trafficsurveypartners.co.uk\/?page_id=625"},"modified":"2025-07-15T14:30:59","modified_gmt":"2025-07-15T13:30:59","slug":"map","status":"publish","type":"page","link":"https:\/\/www.trafficsurveypartners.co.uk\/index.php\/map\/","title":{"rendered":"Map"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"625\" class=\"elementor elementor-625\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-89da3f1 e-flex e-con-boxed e-con e-parent\" data-id=\"89da3f1\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t<div class=\"elementor-element elementor-element-77b5357 e-con-full e-flex e-con e-child\" data-id=\"77b5357\" data-element_type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-e934dc2 elementor-widget elementor-widget-text-editor\" data-id=\"e934dc2\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span lang=\"EN-GB\" style=\"font-size: 12.0pt; line-height: 115%; font-family: 'Aptos',sans-serif; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Aptos; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;\">Ready to discuss your traffic survey needs or request a quote? We\u2019re here to help. <b>To receive a fixed-price quotation<\/b>, simply email us at <b>enquiries@trafficsurveypartners.co.uk<\/b> or call <b>020<\/b><\/span><b><span lang=\"EN-GB\" style=\"font-size: 12.0pt; line-height: 115%; font-family: 'Arial',sans-serif; mso-fareast-font-family: Aptos; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;\">\u202f<\/span><span lang=\"EN-GB\" style=\"font-size: 12.0pt; line-height: 115%; font-family: 'Aptos',sans-serif; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Aptos; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;\">7625<\/span><span lang=\"EN-GB\" style=\"font-size: 12.0pt; line-height: 115%; font-family: 'Arial',sans-serif; mso-fareast-font-family: Aptos; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;\">\u202f<\/span><span lang=\"EN-GB\" style=\"font-size: 12.0pt; line-height: 115%; font-family: 'Aptos',sans-serif; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Aptos; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;\">2883<\/span><\/b><span lang=\"EN-GB\" style=\"font-size: 12.0pt; line-height: 115%; font-family: 'Aptos',sans-serif; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Aptos; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;\"> to speak with our team about your requirements.\u00a0<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1450791 elementor-button-align-stretch elementor-widget elementor-widget-form\" data-id=\"1450791\" data-element_type=\"widget\" data-settings=\"{&quot;step_next_label&quot;:&quot;Next&quot;,&quot;step_previous_label&quot;:&quot;Previous&quot;,&quot;button_width&quot;:&quot;100&quot;,&quot;step_type&quot;:&quot;number_text&quot;,&quot;step_icon_shape&quot;:&quot;circle&quot;}\" data-widget_type=\"form.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<form class=\"elementor-form\" method=\"post\" name=\"New Form\">\n\t\t\t<input type=\"hidden\" name=\"post_id\" value=\"625\"\/>\n\t\t\t<input type=\"hidden\" name=\"form_id\" value=\"1450791\"\/>\n\t\t\t<input type=\"hidden\" name=\"referer_title\" value=\"Map\" \/>\n\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"queried_id\" value=\"625\"\/>\n\t\t\t\n\t\t\t<div class=\"elementor-form-fields-wrapper elementor-labels-above\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-field-type-text elementor-field-group elementor-column elementor-field-group-name elementor-col-100\">\n\t\t\t\t\t\t\t\t\t\t\t\t<label for=\"form-field-name\" class=\"elementor-field-label\">\n\t\t\t\t\t\t\t\tName\t\t\t\t\t\t\t<\/label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input size=\"1\" type=\"text\" name=\"form_fields[name]\" id=\"form-field-name\" class=\"elementor-field elementor-size-sm  elementor-field-textual\" placeholder=\"Name\">\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"elementor-field-type-email elementor-field-group elementor-column elementor-field-group-email elementor-col-100 elementor-field-required\">\n\t\t\t\t\t\t\t\t\t\t\t\t<label for=\"form-field-email\" class=\"elementor-field-label\">\n\t\t\t\t\t\t\t\tEmail\t\t\t\t\t\t\t<\/label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input size=\"1\" type=\"email\" name=\"form_fields[email]\" id=\"form-field-email\" class=\"elementor-field elementor-size-sm  elementor-field-textual\" placeholder=\"Email\" required=\"required\">\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"elementor-field-type-textarea elementor-field-group elementor-column elementor-field-group-message elementor-col-100\">\n\t\t\t\t\t\t\t\t\t\t\t\t<label for=\"form-field-message\" class=\"elementor-field-label\">\n\t\t\t\t\t\t\t\tMessage\t\t\t\t\t\t\t<\/label>\n\t\t\t\t\t\t<textarea class=\"elementor-field-textual elementor-field  elementor-size-sm\" name=\"form_fields[message]\" id=\"form-field-message\" rows=\"4\" placeholder=\"Message\"><\/textarea>\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"elementor-field-type-recaptcha_v3 elementor-field-group elementor-column elementor-field-group-field_1abae4f elementor-col-100 recaptcha_v3-bottomright\">\n\t\t\t\t\t<div class=\"elementor-field\" id=\"form-field-field_1abae4f\"><div class=\"elementor-g-recaptcha\" data-sitekey=\"6LdBn4IrAAAAAGnEzo5bOaEzBBPB9NVFU88CU3WZ\" data-type=\"v3\" data-action=\"Form\" data-badge=\"bottomright\" data-size=\"invisible\"><\/div><\/div>\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"elementor-field-type-html elementor-field-group elementor-column elementor-field-group-field_0733ca0 elementor-col-100\">\n\t\t\t\t\t<!-- Mapa -->\n<div id=\"map\" style=\"height: 450px; margin-bottom: 20px; position: relative;\"><\/div>\n<div id=\"atcHint\" style=\"position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 1000; background: yellow; padding: 5px 10px; font-weight: bold; display: none; border-radius: 6px;\">Click second point for ATC line<\/div>\n\n<!-- Podsumowanie -->\n<div id=\"summary\" style=\"font-family:sans-serif; font-size:14px;\">\n  <strong>Summary:<\/strong><br>\n  Cameras: <span id=\"cameraCount\">0<\/span><br>\n  ANPR Units: <span id=\"anprCount\">0<\/span><br>\n  ATC Lines: <span id=\"atcCount\">0<\/span><br>\n  Estimated Total: \u00a3<span id=\"total\">0.00<\/span>\n<\/div>\n\n<!-- Leaflet -->\n<link rel=\"stylesheet\" href=\"https:\/\/unpkg.com\/leaflet@1.9.4\/dist\/leaflet.css\" \/>\n<script src=\"https:\/\/unpkg.com\/leaflet@1.9.4\/dist\/leaflet.js\"><\/script>\n\n<!-- Styl CSS dla kontrolek -->\n<style>\n  .marker-label {\n    font-family: sans-serif;\n    font-size: 13px;\n    font-weight: bold;\n    text-align: center;\n    background-color: #fff;\n    border: 2px solid #888;\n    border-radius: 6px;\n    padding: 6px;\n    width: 100px;\n    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);\n  }\n  .marker-type-camera {\n    color: #fff;\n    background-color: #0078d7;\n  }\n  .marker-type-anpr {\n    color: #fff;\n    background-color: #d77b00;\n  }\n  .marker-type-atc {\n    color: #fff;\n    background-color: #008000;\n  }\n  .marker-actions {\n    background: #ddd;\n    border-radius: 4px;\n    margin-top: 6px;\n    padding: 4px;\n  }\n  .marker-btn {\n    cursor: pointer;\n    font-size: 16px;\n    padding: 2px 6px;\n  }\n  .popup-menu {\n    background: #fff;\n    padding: 10px;\n    border-radius: 6px;\n    box-shadow: 0 2px 6px rgba(0,0,0,0.2);\n  }\n  .popup-btn {\n    display: block;\n    margin: 5px 0;\n    padding: 6px;\n    background: #0078d7;\n    color: #fff;\n    border: none;\n    width: 100%;\n    border-radius: 4px;\n    cursor: pointer;\n  }\n<\/style>\n\n<script>\n  let map = L.map('map').setView([51.505, -0.09], 13);\n  L.tileLayer('https:\/\/{s}.tile.openstreetmap.org\/{z}\/{x}\/{y}.png', {\n    maxZoom: 18,\n  }).addTo(map);\n\n  let markers = [];\n  let atcLines = [];\n  let cameraCount = 0, anprCount = 0, atcCount = 0;\n  let pendingATC = null;\n\n  function updateSummary() {\n    document.getElementById('cameraCount').innerText = cameraCount;\n    document.getElementById('anprCount').innerText = anprCount;\n    document.getElementById('atcCount').innerText = atcCount;\n    let total = cameraCount * 67.38 + anprCount * 89.99 + atcCount * 45.00;\n    document.getElementById('total').innerText = total.toFixed(2);\n  }\n\n  function createLabel(type, number) {\n    let typeClass = 'marker-type-' + type.toLowerCase();\n    return `<div class='marker-label ${typeClass}'>${type.toUpperCase()} ${number}<div class='marker-actions'><span class='marker-btn' onclick='removeMarker(${number - 1}, \"${type}\")'>\u274c<\/span><\/div><\/div>`;\n  }\n\n  function createATCLabel(number) {\n    return L.divIcon({\n      className: '',\n      html: `<div class='marker-label marker-type-atc'>ATC ${number}<div class='marker-actions'><span class='marker-btn' onclick='removeATC(${number - 1})'>\u274c<\/span><\/div><\/div>`\n    });\n  }\n\n  function removeMarker(index, type) {\n    if (type === 'camera' || type === 'anpr') {\n      if (markers[index]) map.removeLayer(markers[index]);\n      markers.splice(index, 1);\n      if (type === 'camera') cameraCount--;\n      else anprCount--;\n    }\n    updateSummary();\n  }\n\n  function removeATC(index) {\n    if (atcLines[index]) {\n      map.removeLayer(atcLines[index].line);\n      map.removeLayer(atcLines[index].label);\n      atcLines.splice(index, 1);\n      atcCount--;\n      updateSummary();\n    }\n  }\n\n  function showPopupMenu(latlng) {\n    if (pendingATC) {\n      atcCount++;\n      let line = L.polyline([pendingATC, latlng], { color: 'green' }).addTo(map);\n      let midLatLng = L.latLng([\n        (pendingATC.lat + latlng.lat) \/ 2,\n        (pendingATC.lng + latlng.lng) \/ 2\n      ]);\n      let label = L.marker(midLatLng, { icon: createATCLabel(atcCount) }).addTo(map);\n      atcLines.push({ line, label });\n      pendingATC = null;\n      document.getElementById('atcHint').style.display = 'none';\n      updateSummary();\n      return;\n    }\n\n    let popupContent = document.createElement('div');\n    popupContent.className = 'popup-menu';\n\n    ['camera', 'anpr', 'atc'].forEach(type => {\n      let btn = document.createElement('button');\n      btn.className = 'popup-btn';\n      btn.innerText = type.toUpperCase();\n      btn.onclick = () => {\n        map.closePopup();\n        if (type === 'camera') {\n          cameraCount++;\n          let marker = L.marker(latlng, {\n            icon: L.divIcon({ className: '', html: createLabel('camera', cameraCount) })\n          }).addTo(map);\n          marker._type = 'camera';\n          markers.push(marker);\n        } else if (type === 'anpr') {\n          anprCount++;\n          let marker = L.marker(latlng, {\n            icon: L.divIcon({ className: '', html: createLabel('anpr', anprCount) })\n          }).addTo(map);\n          marker._type = 'anpr';\n          markers.push(marker);\n        } else if (type === 'atc') {\n          pendingATC = latlng;\n          document.getElementById('atcHint').style.display = 'block';\n        }\n        updateSummary();\n      };\n      popupContent.appendChild(btn);\n    });\n\n    L.popup().setLatLng(latlng).setContent(popupContent).openOn(map);\n  }\n\n  map.on('click', function(e) {\n    showPopupMenu(e.latlng);\n  });\n<\/script>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"elementor-field-group elementor-column elementor-field-type-submit elementor-col-100 e-form__buttons\">\n\t\t\t\t\t<button class=\"elementor-button elementor-size-sm\" type=\"submit\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Send<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/button>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/form>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-0e9741e e-con-full e-flex e-con e-child\" data-id=\"0e9741e\" data-element_type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-2e62fc6 elementor-widget elementor-widget-text-editor\" data-id=\"2e62fc6\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>We look forward to partnering with you on your next traffic or transport survey project. <strong>Get in touch today<\/strong> to find out how our professional team can support you in collecting the data that drives successful transport planning and decision-making.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Ready to discuss your traffic survey needs or request a quote? We\u2019re here to help. To receive a fixed-price quotation, simply email us at enquiries@trafficsurveypartners.co.uk or call 020\u202f7625\u202f2883 to speak with our team about your requirements.\u00a0 We look forward to partnering with you on your next traffic or transport survey project. Get in touch today [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-625","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.trafficsurveypartners.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/625","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.trafficsurveypartners.co.uk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.trafficsurveypartners.co.uk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.trafficsurveypartners.co.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trafficsurveypartners.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=625"}],"version-history":[{"count":28,"href":"https:\/\/www.trafficsurveypartners.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/625\/revisions"}],"predecessor-version":[{"id":664,"href":"https:\/\/www.trafficsurveypartners.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/625\/revisions\/664"}],"wp:attachment":[{"href":"https:\/\/www.trafficsurveypartners.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}