Estate & Letting Agents in Lochardil, Highland

Find Estate Agents in Lochardil, Highland
12 results
Hamish Homes LTD
Hamish Homes LTD

Inverness

Sales
4 active listings in Lochardil, Highland, Scotland
207 total
Beechwood House Beechwood Park, Inverness, IV2 3BW
View Featured Profile
Tailormade Moves

Inverness

Sales
5 active listings in Lochardil, Highland, Scotland
77 total
The Greenhouse, Beechwood Park, North Inverness, IV2 3BL
View Profile
Home Sweet Home

Inverness

Sales
3 active listings in Lochardil, Highland, Scotland
62 total
6 Bank Street, Inverness, IV1 1QY
View Profile
Strutt & Parker

Inverness

Sales
3 active listings in Lochardil, Highland, Scotland
46 total
Perth Suite Castle House Fairways Business Park Inverness IV2 6AA
View Profile
Macleod & Maccallum

Inverness

Lettings Sales
2 active listings in Lochardil, Highland, Scotland
92 total
28 Queensgate Inverness, IV1 1DJ
View Profile
Galbraith

Inverness

Lettings Sales
1 active listing in Lochardil, Highland, Scotland
44 total
Clark Thomson House, Fairways Business Park, Inverness, IV2 6AA
View Profile
Innes & Mackay

Inverness

Sales
1 active listing in Lochardil, Highland, Scotland
22 total
Kintail House Beechwood Business Park, Inverness, IV2 3BW
View Profile
Mcewan Fraser Legal

Inverness

Sales
1 active listing in Lochardil, Highland, Scotland
79 total
Kintail House Beechwood Park, Inverness, IV2 3BW
Munro & Noble

Inverness

Sales
1 active listing in Lochardil, Highland, Scotland
74 total
20 Inglis Street Inverness IV1 1HN
View Profile
Nested

Nationwide

Sales
1 active listing in Lochardil, Highland, Scotland
435 total
Fora, 9 Dallington Street, London, EC1V 0LN
View Profile
Thorntons Property Services
1 active listing in Lochardil, Highland, Scotland
11 total
Kintail House, Beechwood Business Park, 2 Walter Scott Drive, Inverness, IV2 3BW
Your Move

Inverness

Lettings Sales
1 active listing in Lochardil, Highland, Scotland
26 total
58-60 Academy Street Inverness IV1 1LP
View Profile
initializeAllPremierCards() }); // Load detailed stats function function loadDetailedStats() { const button = document.getElementById('load-more-stats'); const statsContainer = document.getElementById('detailed-stats'); if (statsContainer.classList.contains('hidden')) { // Show loading state button.innerHTML = ` Loading... `; // Make AJAX call for detailed stats const location = 'Lochardil, Highland'; const agentType = ''; fetch(`/api/agents/detailed-stats?location=${encodeURIComponent(location)}&type=${agentType}`) .then(response => response.json()) .then(data => { // Build detailed stats HTML let statsHtml = '
'; // Property types breakdown if (data.propertyTypes && Object.keys(data.propertyTypes).length > 0) { statsHtml += `
Property Types
`; for (const [type, count] of Object.entries(data.propertyTypes)) { const percentage = Math.round((count / data.totalProperties) * 100); statsHtml += `
${type}: ${count.toLocaleString()} (${percentage}%)
`; } statsHtml += '
'; } // Price ranges if (data.priceRanges) { statsHtml += `
Price Ranges
Avg Sale Price: £${data.priceRanges.avgSalePrice?.toLocaleString() || 'N/A'}
Avg Rent PCM: £${data.priceRanges.avgRentPrice?.toLocaleString() || 'N/A'}
`; } // Top performing agents if (data.topAgents && data.topAgents.length > 0) { statsHtml += `
Top Agents
`; data.topAgents.slice(0, 3).forEach(agent => { statsHtml += `
${agent.name}: ${agent.property_count} props
`; }); statsHtml += '
'; } statsHtml += '
'; // Show stats statsContainer.innerHTML = statsHtml; statsContainer.classList.remove('hidden'); // Update button button.innerHTML = ` Hide Insights `; }) .catch(error => { // If API fails, show some calculated stats from existing data const agents = [{"core_branch_id":56745,"verification_status":"pending","verified_at":null,"verified_by":null,"verification_notes":null,"name":"Hamish Homes LTD","email":"askhamish@hamish-homes.co.uk","sales_phone_number":"01463 250000","address":"Beechwood House Beechwood Park,\r\nInverness,\r\nIV2 3BW","postcode":"IV2 3BW","website_url":"https:\/\/www.hamish-homes.co.uk\/","description":null,"listings_feed_url":null,"feed_format":null,"last_feed_sync":null,"crm_provider":null,"logo":"https:\/\/cdn.home.co.uk\/agents\/56745\/logo.png","office_images":null,"claimed_at":null,"created_at":"2025-12-09T17:17:26.000000Z","updated_at":"2026-01-20T20:01:50.000000Z","deleted_at":null,"claimed_user_id":null,"profile_status":"on_hold","assigned_user_id":null,"id":56745,"agent_company_id":5647,"branch_location":"Inverness","lettings_phone_number":null,"is_sales":true,"is_lettings":false,"is_commercial":false,"is_hm_agent":true,"geopoint":"0101000020E6100000736891ED7CBF10C023DBF97E6ABC4C40","agent_brand_id":6443,"offers_sales":true,"offers_lettings":false,"claimed_assigned_user_id":null,"brand_color":null,"logo_rect":null,"address_lines":"Beechwood House Beechwood Park, Inverness","has_home_listings":false,"external_crm_branch_id":null,"agent_name":"Hamish Homes LTD","branch_name":"Inverness","lettings":false,"sales":true,"commercial":false,"h_email":"askhamish@hamish-homes.co.uk","has_email":true,"h_phone":"01463 250000","has_phone":true,"resolved_brand_color":"#d27d2a","boundary_listing_count":"4","property_count":"207","latitude":57.472,"longitude":-4.187},{"core_branch_id":56744,"verification_status":"pending","verified_at":null,"verified_by":null,"verification_notes":null,"name":"Tailormade Moves","email":"laura@tailormademoves.co.uk","sales_phone_number":"01463 233218","address":"The Greenhouse,\r\nBeechwood Park, North\r\nInverness,\r\nIV2 3BL ","postcode":"IV2 3BL","website_url":"http:\/\/www.tailormademoves.co.uk","description":null,"listings_feed_url":null,"feed_format":null,"last_feed_sync":null,"crm_provider":null,"logo":"https:\/\/cdn.home.co.uk\/agents\/56744\/logo.png","office_images":null,"claimed_at":null,"created_at":"2025-12-09T17:17:26.000000Z","updated_at":"2026-01-20T19:53:32.000000Z","deleted_at":null,"claimed_user_id":null,"profile_status":"on_hold","assigned_user_id":null,"id":56744,"agent_company_id":5650,"branch_location":"Inverness","lettings_phone_number":null,"is_sales":true,"is_lettings":false,"is_commercial":false,"is_hm_agent":false,"geopoint":"0101000020E6100000C32ADEC83CC210C02062838593BC4C40","agent_brand_id":6446,"offers_sales":true,"offers_lettings":true,"claimed_assigned_user_id":null,"brand_color":null,"logo_rect":null,"address_lines":"The Greenhouse, Beechwood Park, North, Inverness","has_home_listings":false,"external_crm_branch_id":null,"agent_name":"Tailormade Moves","branch_name":"Inverness","lettings":false,"sales":true,"commercial":false,"h_email":"laura@tailormademoves.co.uk","has_email":true,"h_phone":"01463 233218","has_phone":true,"resolved_brand_color":"#ff5102","boundary_listing_count":"5","property_count":"77","latitude":57.473252,"longitude":-4.189685},{"core_branch_id":56739,"verification_status":"pending","verified_at":null,"verified_by":null,"verification_notes":null,"name":"Home Sweet Home","email":"invernesssales@homesweethomemoves.co.uk","sales_phone_number":"01463 710151","address":"6 Bank Street,\r\nInverness,\r\nIV1 1QY","postcode":"IV1 1QY","website_url":"https:\/\/www.homesweethomemoves.co.uk","description":null,"listings_feed_url":null,"feed_format":null,"last_feed_sync":null,"crm_provider":null,"logo":"https:\/\/cdn.home.co.uk\/agents\/56739\/logo.png","office_images":null,"claimed_at":null,"created_at":"2025-12-09T17:17:26.000000Z","updated_at":"2026-01-20T20:01:38.000000Z","deleted_at":null,"claimed_user_id":null,"profile_status":"on_hold","assigned_user_id":null,"id":56739,"agent_company_id":3175,"branch_location":"Inverness","lettings_phone_number":null,"is_sales":true,"is_lettings":false,"is_commercial":false,"is_hm_agent":false,"geopoint":"0101000020E610000010C99063EBE910C0C93B873254BD4C40","agent_brand_id":3845,"offers_sales":true,"offers_lettings":false,"claimed_assigned_user_id":null,"brand_color":null,"logo_rect":null,"address_lines":"6 Bank Street, Inverness","has_home_listings":false,"external_crm_branch_id":null,"agent_name":"Home Sweet Home","branch_name":"Inverness","lettings":false,"sales":true,"commercial":false,"h_email":"invernesssales@homesweethomemoves.co.uk","has_email":true,"h_phone":"01463 710151","has_phone":true,"resolved_brand_color":"#ffdffe","boundary_listing_count":"3","property_count":"62","latitude":57.479132,"longitude":-4.228437},{"core_branch_id":56753,"verification_status":"pending","verified_at":null,"verified_by":null,"verification_notes":null,"name":"Strutt \u0026 Parker","email":"inverness@struttandparker.com","sales_phone_number":"01463 719171","address":"Perth Suite\r\nCastle House\r\nFairways Business Park\r\nInverness\r\nIV2 6AA","postcode":"IV2 6AA","website_url":"https:\/\/www.struttandparker.com","description":null,"listings_feed_url":null,"feed_format":null,"last_feed_sync":null,"crm_provider":null,"logo":"https:\/\/cdn.home.co.uk\/agents\/56753\/logo.png","office_images":null,"claimed_at":null,"created_at":"2025-12-09T17:17:26.000000Z","updated_at":"2026-01-20T20:01:39.000000Z","deleted_at":null,"claimed_user_id":null,"profile_status":"on_hold","assigned_user_id":null,"id":56753,"agent_company_id":257,"branch_location":"Inverness","lettings_phone_number":null,"is_sales":true,"is_lettings":false,"is_commercial":false,"is_hm_agent":false,"geopoint":"0101000020E610000063B48EAA26D810C0876D8B321BBA4C40","agent_brand_id":547,"offers_sales":true,"offers_lettings":false,"claimed_assigned_user_id":null,"brand_color":null,"logo_rect":null,"address_lines":"Perth Suite, Castle House, Fairways Business Park, Inverness","has_home_listings":false,"external_crm_branch_id":null,"agent_name":"Strutt \u0026 Parker","branch_name":"Inverness","lettings":false,"sales":true,"commercial":false,"h_email":"inverness@struttandparker.com","has_email":true,"h_phone":"01463 719171","has_phone":true,"resolved_brand_color":"#cb1144","boundary_listing_count":"3","property_count":"46","latitude":57.453955,"longitude":-4.211085},{"core_branch_id":56735,"verification_status":"pending","verified_at":null,"verified_by":null,"verification_notes":null,"name":"Macleod \u0026 Maccallum","email":"mail@macandmac.co.uk","sales_phone_number":"01463 235559","address":"28 Queensgate Inverness,\r\nIV1 1DJ","postcode":"IV1 1DJ","website_url":"http:\/\/www.macandmac.co.uk","description":null,"listings_feed_url":null,"feed_format":null,"last_feed_sync":null,"crm_provider":null,"logo":"https:\/\/cdn.home.co.uk\/agents\/56735\/logo.png","office_images":null,"claimed_at":null,"created_at":"2025-12-09T17:17:25.000000Z","updated_at":"2026-01-20T20:01:38.000000Z","deleted_at":null,"claimed_user_id":null,"profile_status":"on_hold","assigned_user_id":null,"id":56735,"agent_company_id":3176,"branch_location":"Inverness","lettings_phone_number":"01463 258002","is_sales":true,"is_lettings":true,"is_commercial":false,"is_hm_agent":false,"geopoint":"0101000020E61000005874EB353DE810C096E7C1DD59BD4C40","agent_brand_id":3846,"offers_sales":true,"offers_lettings":true,"claimed_assigned_user_id":null,"brand_color":null,"logo_rect":null,"address_lines":"28 Queensgate Inverness","has_home_listings":false,"external_crm_branch_id":null,"agent_name":"Macleod \u0026 Maccallum","branch_name":"Inverness","lettings":true,"sales":true,"commercial":false,"h_email":"mail@macandmac.co.uk","has_email":true,"h_phone":"01463 235559","has_phone":true,"resolved_brand_color":"#a1020e","boundary_listing_count":"2","property_count":"92","latitude":57.479305,"longitude":-4.226796},{"core_branch_id":56751,"verification_status":"pending","verified_at":null,"verified_by":null,"verification_notes":null,"name":"Galbraith","email":"inverness@galbraithgroup.com","sales_phone_number":"01463 224343","address":"Clark Thomson House,\r\nFairways Business Park,\r\nInverness,\r\nIV2 6AA","postcode":"IV2 6AA","website_url":"https:\/\/www.galbraithgroup.com","description":null,"listings_feed_url":null,"feed_format":null,"last_feed_sync":null,"crm_provider":null,"logo":"https:\/\/cdn.home.co.uk\/agents\/56751\/logo.png","office_images":null,"claimed_at":null,"created_at":"2025-12-09T17:17:26.000000Z","updated_at":"2026-01-20T20:01:39.000000Z","deleted_at":null,"claimed_user_id":null,"profile_status":"on_hold","assigned_user_id":null,"id":56751,"agent_company_id":1246,"branch_location":"Inverness","lettings_phone_number":"01463 224343","is_sales":true,"is_lettings":true,"is_commercial":false,"is_hm_agent":false,"geopoint":"0101000020E610000063B48EAA26D810C0876D8B321BBA4C40","agent_brand_id":1790,"offers_sales":true,"offers_lettings":true,"claimed_assigned_user_id":null,"brand_color":null,"logo_rect":null,"address_lines":"Clark Thomson House, Fairways Business Park, Inverness","has_home_listings":false,"external_crm_branch_id":null,"agent_name":"Galbraith","branch_name":"Inverness","lettings":true,"sales":true,"commercial":false,"h_email":"inverness@galbraithgroup.com","has_email":true,"h_phone":"01463 224343","has_phone":true,"resolved_brand_color":"#0c4174","boundary_listing_count":"1","property_count":"44","latitude":57.453955,"longitude":-4.211085},{"core_branch_id":56746,"verification_status":"pending","verified_at":null,"verified_by":null,"verification_notes":null,"name":"Innes \u0026 Mackay","email":"margrets@innesmackay.com","sales_phone_number":"01463 251200","address":"Kintail House Beechwood Business Park,\r\nInverness,\r\nIV2 3BW","postcode":"IV2 3BW","website_url":"https:\/\/innesmackay.com\/","description":null,"listings_feed_url":null,"feed_format":null,"last_feed_sync":null,"crm_provider":null,"logo":"https:\/\/cdn.home.co.uk\/agents\/56746\/logo.png","office_images":null,"claimed_at":null,"created_at":"2025-12-09T17:17:26.000000Z","updated_at":"2026-01-20T20:01:39.000000Z","deleted_at":null,"claimed_user_id":null,"profile_status":"on_hold","assigned_user_id":null,"id":56746,"agent_company_id":5648,"branch_location":"Inverness","lettings_phone_number":null,"is_sales":true,"is_lettings":false,"is_commercial":false,"is_hm_agent":false,"geopoint":"0101000020E6100000736891ED7CBF10C023DBF97E6ABC4C40","agent_brand_id":6444,"offers_sales":true,"offers_lettings":false,"claimed_assigned_user_id":null,"brand_color":null,"logo_rect":null,"address_lines":"Kintail House Beechwood Business Park, Inverness","has_home_listings":false,"external_crm_branch_id":null,"agent_name":"Innes \u0026 Mackay","branch_name":"Inverness","lettings":false,"sales":true,"commercial":false,"h_email":"margrets@innesmackay.com","has_email":true,"h_phone":"01463 251200","has_phone":true,"resolved_brand_color":"#d3d452","boundary_listing_count":"1","property_count":"22","latitude":57.472,"longitude":-4.187},{"core_branch_id":56747,"verification_status":"pending","verified_at":null,"verified_by":null,"verification_notes":null,"name":"Mcewan Fraser Legal","email":null,"sales_phone_number":"01463 211116","address":"Kintail House Beechwood Park,\r\nInverness,\r\nIV2 3BW","postcode":"IV2 3BW","website_url":null,"description":null,"listings_feed_url":null,"feed_format":null,"last_feed_sync":null,"crm_provider":null,"logo":"https:\/\/cdn.home.co.uk\/agents\/56747\/logo.png","office_images":null,"claimed_at":null,"created_at":"2025-12-09T17:17:26.000000Z","updated_at":"2026-01-20T20:01:39.000000Z","deleted_at":null,"claimed_user_id":null,"profile_status":"on_hold","assigned_user_id":null,"id":56747,"agent_company_id":2481,"branch_location":"Inverness","lettings_phone_number":null,"is_sales":true,"is_lettings":false,"is_commercial":false,"is_hm_agent":false,"geopoint":"0101000020E6100000736891ED7CBF10C023DBF97E6ABC4C40","agent_brand_id":3114,"offers_sales":true,"offers_lettings":false,"claimed_assigned_user_id":null,"brand_color":null,"logo_rect":null,"address_lines":"Kintail House Beechwood Park, Inverness","has_home_listings":false,"external_crm_branch_id":null,"agent_name":"Mcewan Fraser Legal","branch_name":"Inverness","lettings":false,"sales":true,"commercial":false,"h_email":null,"has_email":false,"h_phone":"01463 211116","has_phone":true,"resolved_brand_color":"#156c56","boundary_listing_count":"1","property_count":"79","latitude":57.472,"longitude":-4.187},{"core_branch_id":56736,"verification_status":"pending","verified_at":null,"verified_by":null,"verification_notes":null,"name":"Munro \u0026 Noble","email":"peterc@munronoble.com","sales_phone_number":"01463 225533","address":"20\r\nInglis Street\r\nInverness\r\nIV1 1HN","postcode":"IV1 1HN","website_url":"http:\/\/www.munronoble.com\/property","description":null,"listings_feed_url":null,"feed_format":null,"last_feed_sync":null,"crm_provider":null,"logo":"https:\/\/cdn.home.co.uk\/agents\/56736\/logo.png","office_images":null,"claimed_at":null,"created_at":"2025-12-09T17:17:25.000000Z","updated_at":"2026-01-20T20:01:38.000000Z","deleted_at":null,"claimed_user_id":null,"profile_status":"on_hold","assigned_user_id":null,"id":56736,"agent_company_id":3177,"branch_location":"Inverness","lettings_phone_number":null,"is_sales":true,"is_lettings":false,"is_commercial":false,"is_hm_agent":false,"geopoint":"0101000020E61000009DBD33DAAAE410C06308008E3DBD4C40","agent_brand_id":3847,"offers_sales":true,"offers_lettings":false,"claimed_assigned_user_id":null,"brand_color":null,"logo_rect":null,"address_lines":"20, Inglis Street, Inverness","has_home_listings":false,"external_crm_branch_id":null,"agent_name":"Munro \u0026 Noble","branch_name":"Inverness","lettings":false,"sales":true,"commercial":false,"h_email":"peterc@munronoble.com","has_email":true,"h_phone":"01463 225533","has_phone":true,"resolved_brand_color":"#233081","boundary_listing_count":"1","property_count":"74","latitude":57.478441,"longitude":-4.223308},{"core_branch_id":54439,"verification_status":"pending","verified_at":null,"verified_by":null,"verification_notes":null,"name":"Nested","email":"help@nested.com","sales_phone_number":"020 3858 0695","address":"Fora,\r\n9 Dallington Street,\r\nLondon, \r\nEC1V 0LN","postcode":"EC1V 0LN","website_url":"https:\/\/nested.com\/hornchurch","description":null,"listings_feed_url":null,"feed_format":null,"last_feed_sync":null,"crm_provider":null,"logo":"https:\/\/cdn.home.co.uk\/agents\/54439\/logo.png","office_images":null,"claimed_at":null,"created_at":"2025-12-09T17:16:09.000000Z","updated_at":"2026-01-20T19:53:09.000000Z","deleted_at":null,"claimed_user_id":null,"profile_status":"on_hold","assigned_user_id":null,"id":54439,"agent_company_id":7388,"branch_location":"Nationwide","lettings_phone_number":null,"is_sales":true,"is_lettings":false,"is_commercial":false,"is_hm_agent":false,"geopoint":"0101000020E6100000CC46E7FC14C7B9BFB037312427C34940","agent_brand_id":8232,"offers_sales":true,"offers_lettings":true,"claimed_assigned_user_id":null,"brand_color":null,"logo_rect":null,"address_lines":"Fora, 9 Dallington Street, London","has_home_listings":false,"external_crm_branch_id":null,"agent_name":"Nested","branch_name":"Nationwide","lettings":false,"sales":true,"commercial":false,"h_email":"help@nested.com","has_email":true,"h_phone":"020 3858 0695","has_phone":true,"resolved_brand_color":"#ff907c","boundary_listing_count":"1","property_count":"435","latitude":51.524632,"longitude":-0.100694},{"core_branch_id":56748,"verification_status":"pending","verified_at":null,"verified_by":null,"verification_notes":null,"name":"Thorntons Property Services","email":null,"sales_phone_number":"03330 430150","address":"Kintail House, Beechwood Business Park,\r\n2 Walter Scott Drive,\r\nInverness,\r\nIV2 3BW","postcode":"IV2 3BW","website_url":null,"description":null,"listings_feed_url":null,"feed_format":null,"last_feed_sync":null,"crm_provider":null,"logo":"https:\/\/cdn.home.co.uk\/agents\/56748\/logo.png","office_images":null,"claimed_at":null,"created_at":"2025-12-09T17:17:26.000000Z","updated_at":"2026-01-20T20:01:39.000000Z","deleted_at":null,"claimed_user_id":null,"profile_status":"on_hold","assigned_user_id":null,"id":56748,"agent_company_id":708,"branch_location":"Inverness","lettings_phone_number":null,"is_sales":true,"is_lettings":false,"is_commercial":false,"is_hm_agent":false,"geopoint":"0101000020E6100000736891ED7CBF10C023DBF97E6ABC4C40","agent_brand_id":1191,"offers_sales":true,"offers_lettings":false,"claimed_assigned_user_id":null,"brand_color":null,"logo_rect":null,"address_lines":"Kintail House, Beechwood Business Park, 2 Walter Scott Drive, Inverness","has_home_listings":false,"external_crm_branch_id":null,"agent_name":"Thorntons Property Services","branch_name":"Inverness","lettings":false,"sales":true,"commercial":false,"h_email":null,"has_email":false,"h_phone":"03330 430150","has_phone":true,"resolved_brand_color":"#fdbec0","boundary_listing_count":"1","property_count":"11","latitude":57.472,"longitude":-4.187},{"core_branch_id":56738,"verification_status":"pending","verified_at":null,"verified_by":null,"verification_notes":null,"name":"Your Move","email":"inverness@your-move.co.uk","sales_phone_number":"01463 234743","address":"58-60 \r\n Academy Street\r\nInverness\r\nIV1 1LP \r\n ","postcode":"IV1 1LP","website_url":"https:\/\/www.your-move.co.uk\/estate-agent\/inverness","description":null,"listings_feed_url":null,"feed_format":null,"last_feed_sync":null,"crm_provider":null,"logo":"https:\/\/cdn.home.co.uk\/agents\/56738\/logo.png","office_images":null,"claimed_at":null,"created_at":"2025-12-09T17:17:26.000000Z","updated_at":"2026-01-20T20:01:38.000000Z","deleted_at":null,"claimed_user_id":null,"profile_status":"on_hold","assigned_user_id":null,"id":56738,"agent_company_id":747,"branch_location":"Inverness","lettings_phone_number":"01463 234743","is_sales":true,"is_lettings":true,"is_commercial":false,"is_hm_agent":false,"geopoint":"0101000020E61000001C295B24EDE610C0F8C5A52A6DBD4C40","agent_brand_id":1232,"offers_sales":true,"offers_lettings":true,"claimed_assigned_user_id":null,"brand_color":null,"logo_rect":null,"address_lines":"58-60, Academy Street, Inverness","has_home_listings":false,"external_crm_branch_id":null,"agent_name":"Your Move","branch_name":"Inverness","lettings":true,"sales":true,"commercial":false,"h_email":"inverness@your-move.co.uk","has_email":true,"h_phone":"01463 234743","has_phone":true,"resolved_brand_color":"#63aa2e","boundary_listing_count":"1","property_count":"26","latitude":57.479894,"longitude":-4.225514}]; let topAgents = []; agents.forEach(agent => { // Collect top agents if (agent.property_count > 0) { topAgents.push({ name: agent.name, property_count: agent.property_count }); } }); // Sort top agents topAgents.sort((a, b) => b.property_count - a.property_count); let statsHtml = '
'; // Show top agents if (topAgents.length > 0) { statsHtml += `
Top Performing Agents
`; topAgents.slice(0, 5).forEach(agent => { statsHtml += `
${agent.name}: ${agent.property_count} properties
`; }); statsHtml += '
'; } statsHtml += '
'; statsContainer.innerHTML = statsHtml; statsContainer.classList.remove('hidden'); button.innerHTML = ` Hide Insights `; }); } else { // Hide stats statsContainer.classList.add('hidden'); button.innerHTML = ` Load Detailed Insights `; } } // Open agent map function function openAgentMap(locationSlug) { // Use the floating view toggle button const mapBtn = document.getElementById('agent-view-map'); if (mapBtn) { mapBtn.click(); } else { // Fallback to old button const oldMapBtn = document.getElementById('view-map-btn'); if (oldMapBtn) { oldMapBtn.click(); } else { // Last resort - open map page window.location.href = `/agents/${locationSlug}/map`; } } }