### Google Analytics Tracking Setup Source: https://geo.pictures/UZ Initializes Google Analytics tracking using the gtag.js library. It ensures the dataLayer is available and configures the analytics with a specific measurement ID. ```javascript window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-CC8B1GEFP6'); ``` -------------------------------- ### Google Analytics Tracking Setup Source: https://geo.pictures/PT Initializes Google Analytics tracking using the gtag.js library. It ensures the dataLayer is available and configures the analytics with a specific measurement ID. ```javascript window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-CC8B1GEFP6'); ``` -------------------------------- ### Google Analytics Tracking Setup Source: https://geo.pictures/MX Initializes Google Analytics tracking using the gtag.js library. It ensures the dataLayer is available and configures the analytics with a specific measurement ID. ```javascript window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-CC8B1GEFP6'); ``` -------------------------------- ### Google Analytics Tracking Setup Source: https://geo.pictures/CZ Initializes Google Analytics tracking using the gtag.js library. It ensures the dataLayer is available and configures the analytics with a specific measurement ID. ```javascript window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-CC8B1GEFP6'); ``` -------------------------------- ### Google Analytics Tracking Setup Source: https://geo.pictures/ES Initializes Google Analytics tracking using the gtag.js library. It ensures the dataLayer is available and configures the analytics with a specific measurement ID. ```javascript window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-CC8B1GEFP6'); ``` -------------------------------- ### Google Analytics Tracking Setup Source: https://geo.pictures/FR Initializes Google Analytics tracking using the gtag.js library. It ensures the dataLayer is available and configures the analytics with a specific measurement ID. ```javascript window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-CC8B1GEFP6'); ``` -------------------------------- ### Google Analytics Tracking Setup Source: https://geo.pictures/NL Initializes Google Analytics tracking using the gtag.js library. It ensures the dataLayer is available and configures the analytics with a specific measurement ID. ```javascript window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-CC8B1GEFP6'); ``` -------------------------------- ### Google Analytics Tracking Setup Source: https://geo.pictures/BR Initializes Google Analytics tracking using the gtag.js library. It ensures the dataLayer is available and configures the analytics with a specific measurement ID. ```javascript window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-CC8B1GEFP6'); ``` -------------------------------- ### Google Analytics Tracking Setup Source: https://geo.pictures/DE Initializes Google Analytics tracking using the gtag.js library. It ensures the dataLayer is available and configures the analytics with a specific measurement ID. ```javascript window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-CC8B1GEFP6'); ``` -------------------------------- ### Tailwind CSS Configuration Source: https://geo.pictures/terms Configuration object for Tailwind CSS, defining theme extensions for colors, animations, and keyframes. This setup customizes the styling capabilities for the project. ```javascript tailwind.config = { theme: { extend: { colors: { 'green-gradient-start': '#10B981', 'green-gradient-end': '#047857', }, animation: { 'float': 'float 6s ease-in-out infinite', 'pulse-slow': 'pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite', }, keyframes: { float: { '0%, 100%': { transform: 'translateY(0)' }, '50%': { transform: 'translateY(-10px)' } } } } } } ``` -------------------------------- ### Google Analytics Tracking Setup Source: https://geo.pictures/GB Initializes Google Analytics tracking using the gtag.js library. It ensures the dataLayer is available and configures the analytics with a specific measurement ID. ```javascript window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-CC8B1GEFP6'); ``` -------------------------------- ### Google Analytics Tracking Setup Source: https://geo.pictures/CA Initializes Google Analytics tracking using the gtag.js library. It ensures the dataLayer is available and configures the analytics with a specific measurement ID. ```javascript window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-CC8B1GEFP6'); ``` -------------------------------- ### Google Analytics Tracking Setup Source: https://geo.pictures/US Initializes Google Analytics tracking using the gtag.js library. It ensures the dataLayer is available and configures the analytics with a specific measurement ID. ```javascript window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-CC8B1GEFP6'); ``` -------------------------------- ### Country Data Example Source: https://geo.pictures/ A JSON array representing a list of countries, each with its geoname ID, ISO code, name, population, geographical coordinates, and other relevant data. ```json [{"id":158,"geoname_id":3996063,"code":"MX","name":"Mexico","flag_emoji":"\ud83c\uddf2\ud83c\uddfd","photo_cnt":282038,"population":126190788,"created_at":"2025-05-10T06:55:43.000000Z","updated_at":"2025-06-05T20:10:09.000000Z","latitude":"23.62663755","longitude":"-102.53818627","cities_count":8695},{"id":65,"geoname_id":357994,"code":"EG","name":"Egypt","flag_emoji":"\ud83c\uddea\ud83c\uddec","photo_cnt":100,"population":98423595,"created_at":"2025-05-10T06:55:43.000000Z","updated_at":"2025-06-05T20:10:09.000000Z","latitude":"26.69797250","longitude":"30.00000000","cities_count":243},{"id":40,"geoname_id":203312,"code":"CD","name":"Democratic Republic of the Congo","flag_emoji":"\ud83c\udde8\ud83c\udde9","photo_cnt":1,"population":84068091,"created_at":"2025-05-10T06:55:43.000000Z","updated_at":"2025-06-05T20:10:09.000000Z","latitude":"-4.03351600","longitude":"21.75848675","cities_count":116},{"id":57,"geoname_id":2921044,"code":"DE","name":"Germany","flag_emoji":"\ud83c\udde9\ud83c\uddea","photo_cnt":420512,"population":82927922,"created_at":"2025-05-10T06:55:43.000000Z","updated_at":"2025-06-05T20:10:09.000000Z","latitude":"51.16425360","longitude":"10.45406546","cities_count":7405},{"id":226,"geoname_id":298795,"code":"TR","name":"Turkey","flag_emoji":"\ud83c\uddf9\ud83c\uddf7","photo_cnt":1776,"population":82319724,"created_at":"2025-05-10T06:55:43.000000Z","updated_at":"2025-06-05T20:10:10.000000Z","latitude":"38.95853557","longitude":"35.24231686","cities_count":1694},{"id":108,"geoname_id":130758,"code":"IR","name":"Iran","flag_emoji":"\ud83c\uddee\ud83c\uddf7","photo_cnt":681,"population":81800269,"created_at":"2025-05-10T06:55:43.000000Z","updated_at":"2025-06-05T20:10:09.000000Z","latitude":"32.42131395","longitude":"53.68298785","cities_count":285},{"id":219,"geoname_id":1605651,"code":"TH","name":"Thailand","flag_emoji":"\ud83c\uddf9\ud83c\udded","photo_cnt":1324,"population":69428524,"created_at":"2025-05-10T06:55:43.000000Z","updated_at":"2025-06-05T20:10:10.000000Z","latitude":"13.03899700","longitude":"101.49010400","cities_count":335},{"id":75,"geoname_id":3017382,"code":"FR","name":"France","flag_emoji":"\ud83c\uddeb\ud83c\uddf7","photo_cnt":569960,"population":66987244,"created_at":"2025-05-10T06:55:43.000000Z","updated_at":"2025-06-05T20:10:09.000000Z","latitude":"46.22677421","longitude":"2.20940852","cities_count":8879},{"id":77,"geoname_id":2635167,"code":"GB","name":"United Kingdom","flag_emoji":"\ud83c\uddec\ud83c\udde7","photo_cnt":585786,"population":66488991,"created_at":"2025-05-10T06:55:43.000000Z","updated_at":"2025-06-05T20:10:09.000000Z","latitude":"54.63181821","longitude":"-3.42440433","cities_count":3966},{"id":110,"geoname_id":130758,"code":"IT","name":"Italy","flag_emoji":"\ud83c\uddee\ud83c\uddf9","photo_cnt":292238,"population":60431283,"created_at":"2025-05-10T06:55:43.000000Z","updated_at":"2025-06-05T20:10:09.000000Z","latitude":"41.86793270","longitude":"12.57350138","cities_count":6696},{"id":49,"geoname_id":3686110,"code":"CO","name":"Colombia","flag_emoji":"\ud83c\udde8\ud83c\uddf4","photo_cnt":1156,"population":49648685,"created_at":"2025-05-10T06:55:43.000000Z","updated_at":"2025-06-05T20:10:09.000000Z","latitude":"4.57880549","longitude":"-74.29149552","cities_count":957},{"id":68,"geoname_id":2510769,"code":"ES","name":"Spain","flag_emoji":"\ud83c\uddea\ud83c\uddf8","photo_cnt":80778,"population":46723749,"created_at":"2025-05-10T06:55:43.000000Z","updated_at":"2025-06-05T20:10:09.000000Z","latitude":"39.89573051","longitude":"-2.48686547","cities_count":3104},{"id":231,"geoname_id":690791,"code":"UA","name":"Ukraine","flag_emoji":"\ud83c\uddfa\ud83c\udde6","photo_cnt":244978,"population":44622516,"created_at":"2025-05-10T06:55:43.000000Z","updated_at":"2025-06-05T20:10:10.000000Z","latitude":"48.38071426","longitude":"31.17877917","cities_count":2129},{"id":10,"geoname_id":3865483,"code":"AR","name":"Argentina","flag_emoji":"\ud83c\udde6\ud83c\uddf7","photo_cnt":9020,"population":44494502,"created_at":"2025-05-10T06:55:43.000000Z","updated_at":"2025-06-05T20:10:09.000000Z","latitude":"-38.41782481","longitude":"-63.60213268","cities_count":784},{"id":180,"geoname_id":798544,"code":"PL","name":"Poland","flag_emoji":"\ud83c\uddf5\ud83c\uddf1","photo_cnt":290785,"population":37978548,"created_at":"2025-05-10T06:55:43.000000Z","updated_at":"2025-06-05T20:10:10.000000Z","latitude":"51.91891759","longitude":"19.13433394","cities_count":2546},{"id":3,"geoname_id":1149361,"code":"AF","name":"Afghanistan","flag_emoji":"\ud83c\udde6\ud83c\uddeb","photo_cnt":72,"population":37172386,"created_at":"2025-05-10T06:55:43.000000Z","updated_at":"2025-06-05T20:10:09.000000Z","latitude":"33.933"}] ``` -------------------------------- ### Tailwind CSS Configuration Source: https://geo.pictures/IT Configuration object for Tailwind CSS, defining theme extensions for colors, animations, and keyframes. This setup customizes the design system for the website. ```javascript tailwind.config = { theme: { extend: { colors: { 'green-gradient-start': '#10B981', 'green-gradient-end': '#047857' }, animation: { 'float': 'float 6s ease-in-out infinite', 'pulse-slow': 'pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite' }, keyframes: { float: { '0%, 100%': { transform: 'translateY(0)' }, '50%': { transform: 'translateY(-10px)' } } } } } } ``` -------------------------------- ### Leaflet.js Map Initialization and Markers Source: https://geo.pictures/ Initializes an interactive world map using Leaflet.js, adds OpenStreetMap tiles, custom zoom controls, and dynamically places markers for countries based on provided JSON data. Each marker includes a custom icon and a popup displaying country details and a link to view photos. ```javascript document.addEventListener('DOMContentLoaded', function() { try { // Initialize the map const map = L.map('worldMap', { zoomControl: false, attributionControl: false }).setView([20, 0], 2); // Add OpenStreetMap tiles with custom style L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 19, minZoom: 2 }).addTo(map); // Add zoom control to the top right L.control.zoom({ position: 'topright' }).addTo(map); // Custom marker icon const markerIcon = L.divIcon({ className: 'custom-marker', html: '
', iconSize: [16, 16], iconAnchor: [8, 8] }); // Get countries data from the data attribute const mapElement = document.getElementById('worldMap'); if (!mapElement) { // console.error('Map element not found'); return; } const countriesData = JSON.parse(mapElement.dataset.countries || '[]'); // console.log('Countries data:', countriesData); if (!Array.isArray(countriesData)) { // console.error('Invalid countries data format'); return; } // Add country markers countriesData.forEach(country => { if (country.latitude && country.longitude) { // console.log('Adding marker for:', country.name, 'at', country.latitude, country.longitude); const marker = L.marker([country.latitude, country.longitude], { icon: markerIcon }).addTo(map); // Create popup content const popupContent = `${new Intl.NumberFormat().format(country.population || 0)} people
${country.cities_count || 0} cities