`; } function getContributionsContent(category) { return `

Recent Contributions

Community contributions will be displayed here.

`; } function closeSectionModal() { const modal = document.getElementById('sectionModal'); if (modal) { modal.remove(); document.body.style.overflow = 'auto'; } } function openContributionModal() { const modalHTML = `

Submit a Resource

Submit a Published Resource

Submit a Member-Created Resource

`; document.body.insertAdjacentHTML('beforeend', modalHTML); document.body.style.overflow = 'hidden'; } function closeContributionModal() { const modal = document.getElementById('contributionModal'); if (modal) { modal.remove(); document.body.style.overflow = 'auto'; } } function handlePublishedSubmission(event) { event.preventDefault(); const form = event.target; const submission = { type: form.querySelector('select[name="type"]').value, category: form.querySelector('select[name="category"]').value, state: form.querySelector('select[name="state"]').value, title: form.querySelector('input[name="title"]').value, author: form.querySelector('input[name="author"]').value, keywords: form.querySelector('input[name="keywords"]').value.split(',').map(k => k.trim()), url: form.querySelector('input[name="url"]').value, dateSubmitted: new Date().toISOString() }; if (!submission.type || !submission.category || !submission.title || !submission.author || !submission.keywords.length || !submission.url) { alert('Please fill in all required fields'); return; } SUBMITTED_RESOURCES.push(submission); updateResourceLibrary(submission); showSubmissionSuccess('Resource submitted successfully!'); } function handleMemberSubmission(event) { event.preventDefault(); const form = event.target; const submission = { type: form.querySelector('select[name="type"]').value, category: 'member-contributions', title: form.querySelector('input[name="title"]').value, author: form.querySelector('input[name="author"]').value, keywords: form.querySelector('input[name="keywords"]').value.split(',').map(k => k.trim()), url: form.querySelector('input[name="url"]')?.value || null }; if (!submission.type || !submission.title || !submission.author || !submission.keywords.length) { alert('Please fill in all required fields'); return; } console.log('Member submission:', submission); showSubmissionSuccess('Member contribution submitted successfully!'); } function showSubmissionSuccess(message) { const successHTML = `
${message}
`; document.body.insertAdjacentHTML('beforeend', successHTML); setTimeout(() => { const successMessage = document.getElementById('successMessage'); if (successMessage) { successMessage.remove(); } }, 3000); closeContributionModal(); } function generateModule(category) { const moduleType = document.getElementById('moduleTypeSelect').value; const keywords = document.getElementById('moduleKeywords').value; if (!moduleType) { alert('Please select a module type'); return; } const moduleContent = generateModuleByType(moduleType, category, keywords); document.getElementById('generatedModuleContent').innerHTML = moduleContent; } function generateRandomModule(category) { const moduleTypes = Object.values(MODULE_TYPES); const randomType = moduleTypes[Math.floor(Math.random() * moduleTypes.length)]; const moduleContent = generateModuleByType(randomType, category); document.getElementById('generatedModuleContent').innerHTML = moduleContent; } function generateModuleByType(type, category, keywords = '') { const moduleTemplates = { [MODULE_TYPES.QUIZ]: generateQuiz, [MODULE_TYPES.SIMULATION]: generateSimulation, [MODULE_TYPES.TUTORIAL]: generateTutorial, [MODULE_TYPES.CASE_STUDY]: generateCaseStudy, [MODULE_TYPES.FLASHCARDS]: generateFlashcards, [MODULE_TYPES.DRAG_DROP]: generateDragDrop, [MODULE_TYPES.INFOGRAPHICS]: generateInfographics, [MODULE_TYPES.DECISION_TREE]: generateDecisionTree, [MODULE_TYPES.RANDOM_CHALLENGE]: generateRandomChallenge }; return moduleTemplates[type](category, keywords); } function generateQuiz(category, keywords) { return `

Interactive Quiz: ${category}

Quiz content based on ${keywords || 'category material'}

`; } function generateSimulation(category, keywords) { return `

Interactive Simulation: ${category}

Simulation based on ${keywords || 'category material'}

`; } function generateTutorial(category, keywords) { return `

Interactive Tutorial: ${category}

Tutorial content based on ${keywords || 'category material'}

`; } function generateCaseStudy(category, keywords) { return `

Case Study: ${category}

Case study based on ${keywords || 'category material'}

`; } function generateFlashcards(category, keywords) { return `

Flashcards: ${category}

Flashcards based on ${keywords || 'category material'}

`; } function generateDragDrop(category, keywords) { return `

Drag and Drop Exercise: ${category}

Exercise based on ${keywords || 'category material'}

`; } function generateInfographics(category, keywords) { return `

Interactive Infographic: ${category}

Infographic based on ${keywords || 'category material'}

`; } function generateDecisionTree(category, keywords) { return `

Decision Tree: ${category}

Decision tree based on ${keywords || 'category material'}

`; } function generateRandomChallenge(category, keywords) { return `

Random Challenge: ${category}

Challenge based on ${keywords || 'category material'}

`; } function showResourceSummary(resource) { const resourceDetails = RESOURCE_CACHE.get(resource.title) || RESOURCE_DETAILS[resource.title] || generateResourceDetails(resource); RESOURCE_CACHE.set(resource.title, resourceDetails); const sections = [{ id: 'overview', title: 'Overview', content: generateResourceOverview(resourceDetails), expanded: true }, { id: 'methodology', title: 'Methodology & Key Findings', content: generateMethodologySection(resourceDetails), expanded: false }, { id: 'related', title: 'Related Resources', content: generateRelatedSection(resourceDetails), expanded: false }, { id: 'visuals', title: 'Visual Data', content: generateVisualsSection(resourceDetails), expanded: false }]; const modalHTML = `

${resourceDetails.title}

By ${resourceDetails.author}

Published: ${resourceDetails.date || 'Date not available'}

${sections.map(section => `
${section.content}
`).join('')}
${resourceDetails.keywords.map(keyword => ` `).join('')}

Citations: ${resourceDetails.citations}

Downloads: ${resourceDetails.downloads}

`; document.body.insertAdjacentHTML('beforeend', modalHTML); document.body.style.overflow = 'hidden'; } function closeResourceSummary() { const modal = document.getElementById('resourceSummaryModal'); if (modal) { modal.remove(); document.body.style.overflow = 'auto'; } } function generateResourceOverview(resource) { const overview = resource.description || 'This resource provides valuable insights into surveying practices and methodologies.'; const objective = resource.objective || 'The material aims to enhance understanding of key surveying concepts and their practical applications.'; return `

${overview}

${objective}

`; } function generateKeyTopics(resource) { const defaultTopics = ['Introduction to core concepts', 'Practical applications and methodologies', 'Best practices and guidelines', 'Industry standards and compliance']; const topics = resource.topics || defaultTopics; return topics.map(topic => `
  • ${topic}
  • `).join(''); } function showRelatedResources(category) { navigateToSection(category, 'resources'); closeResourceSummary(); } function performSearch() { const category = document.getElementById('categoryFilter').value; const state = document.getElementById('stateFilter').value; const searchTerm = document.getElementById('searchInput').value.toLowerCase(); const resourceType = document.getElementById('resourceTypeFilter').value; const keyword = document.getElementById('keywordFilter').value.toLowerCase(); CURRENT_FILTERS.category = category; CURRENT_FILTERS.keyword = keyword; CURRENT_FILTERS.resourceType = resourceType; const cards = document.querySelectorAll('.category-card, .resource-item'); cards.forEach(card => { const cardCategory = card.dataset.category; const cardState = card.dataset.state || ''; const cardContent = card.textContent.toLowerCase(); const cardType = card.dataset.resourceType; const cardKeywords = (card.dataset.keywords || '').toLowerCase(); const matchesCategory = !category || cardCategory === category; const matchesState = !state || cardState === state; const matchesSearch = !searchTerm || cardContent.includes(searchTerm); const matchesType = !resourceType || cardType === resourceType; const matchesKeyword = !keyword || cardKeywords.includes(keyword); if (matchesCategory && matchesState && matchesSearch && matchesType && matchesKeyword) { card.classList.remove('hidden'); } else { card.classList.add('hidden'); } }); } function initializeFilters() { const categorySelect = document.getElementById('categoryFilter'); categorySelect.innerHTML = ` `; const stateSelect = document.getElementById('stateFilter'); Object.entries(US_STATES).forEach(([code, name]) => { const option = document.createElement('option'); option.value = code; option.textContent = name; stateSelect.appendChild(option); }); document.getElementById('categoryFilter').addEventListener('change', performSearch); document.getElementById('stateFilter').addEventListener('change', performSearch); document.getElementById('searchInput').addEventListener('input', debounce(performSearch, 300)); const filterContainer = document.querySelector('.flex.flex-col.md\\:flex-row'); if (filterContainer) { if (window.innerWidth <= 768) { filterContainer.classList.add('space-y-2'); } } window.addEventListener('resize', debounce(() => { if (filterContainer) { if (window.innerWidth <= 768) { filterContainer.classList.add('space-y-2'); } else { filterContainer.classList.remove('space-y-2'); } } }, 250)); } function debounce(func, wait) { let timeout; return function (...args) { const context = this; clearTimeout(timeout); timeout = setTimeout(() => { func.apply(context, args); }, wait); }; } function updateResourceLibrary(newResource) { const resourceCard = generateResourceCard(newResource); const categorySection = document.querySelector(`[data-category="${newResource.category}"]`); if (categorySection) { categorySection.querySelector('.resources-container').insertAdjacentHTML('beforeend', resourceCard); } performSearch(); } function generateResourceCard(resource) { return `

    ${resource.title}

    By ${resource.author}

    ${resource.description || ''}

    ${resource.keywords.map(keyword => `${keyword}`).join('')}
    View Resource
    `; } function openMemberResourcesModal() { const modalHTML = `

    Member Submitted Resources

    ${SUBMITTED_RESOURCES.map(resource => `

    ${resource.title}

    By ${resource.author}

    Category: ${MODULE_TYPE_NAMES[resource.category] || resource.category}

    ${resource.state !== 'all' ? `

    State: ${US_STATES[resource.state]}

    ` : ''}
    ${(resource.keywords || []).map(keyword => `${keyword}`).join('')}
    View Resource
    `).join('')}
    `; document.body.insertAdjacentHTML('beforeend', modalHTML); document.body.style.overflow = 'hidden'; document.getElementById('resourceTypeFilter')?.addEventListener('change', filterMemberResources); document.getElementById('categoryFilter')?.addEventListener('change', filterMemberResources); document.getElementById('stateFilter')?.addEventListener('change', filterMemberResources); document.getElementById('keywordSearch')?.addEventListener('input', debounce(filterMemberResources, 300)); if (window.innerWidth <= 768) { const modalContent = document.querySelector('#memberResourcesModal .max-w-6xl'); if (modalContent) { modalContent.style.margin = '1rem'; modalContent.style.width = 'calc(100% - 2rem)'; } const filterContainer = document.querySelector('#memberResourcesModal .flex.flex-wrap'); if (filterContainer) { filterContainer.classList.add('space-y-2'); } } } function closeMemberResourcesModal() { const modal = document.getElementById('memberResourcesModal'); if (modal) { modal.remove(); document.body.style.overflow = 'auto'; } } function filterMemberResources() { const resourceType = document.getElementById('resourceTypeFilter')?.value || ''; const category = document.getElementById('categoryFilter')?.value || ''; const state = document.getElementById('stateFilter')?.value || ''; const keyword = document.getElementById('keywordSearch')?.value?.toLowerCase() || ''; const resourceCards = document.querySelectorAll('#memberResourcesModal .grid > div'); resourceCards.forEach(card => { const cardType = card.dataset.resourceType || ''; const cardCategory = card.dataset.category || ''; const cardState = card.dataset.state || ''; const cardContent = card.textContent.toLowerCase(); const matchesType = !resourceType || cardType === resourceType; const matchesCategory = !category || cardCategory === category; const matchesState = !state || cardState === state || cardState === 'all'; const matchesKeyword = !keyword || cardContent.includes(keyword); if (matchesType && matchesCategory && matchesState && matchesKeyword) { card.classList.remove('hidden'); } else { card.classList.add('hidden'); } }); } function generateQuiz(category, keywords) { return `

    Interactive Quiz: ${category}

    ${keywords ? `Custom quiz focusing on: ${keywords}` : `General quiz covering ${category} fundamentals`}

    ${generateQuizQuestions(category, keywords)}
    `; } function generateSimulation(category, keywords) { return `

    Interactive Simulation: ${category}

    ${generateSimulationControls(category, keywords)}
    `; } function generateTutorial(category, keywords) { return `

    Interactive Tutorial: ${category}

    Progress Step 1 of 5
    ${generateTutorialSteps(category, keywords)}
    `; } function generateQuizQuestions(category, keywords) { // Dynamic question generation based on category and keywords const questions = getQuestionsForCategory(category, keywords); return questions.map((q, index) => `

    ${q.question}

    ${q.options.map((opt, i) => ` `).join('')}
    `).join(''); } function generateSimulationControls(category, keywords) { // Dynamic control generation based on simulation type return `
    `; } function generateTutorialSteps(category, keywords) { // Generate tutorial content based on category and keywords const steps = getTutorialSteps(category, keywords); return steps.map((step, index) => `
    ${step.title}

    ${step.content}

    ${step.interactive ? generateInteractiveElement(step) : ''}
    `).join(''); } function nextStep() { // Handle tutorial navigation const currentStep = document.querySelector('.tutorial-step:not(.hidden)'); const nextStep = currentStep.nextElementSibling; if (nextStep) { currentStep.classList.add('hidden'); nextStep.classList.remove('hidden'); updateProgress(); } } function previousStep() { // Handle tutorial navigation const currentStep = document.querySelector('.tutorial-step:not(.hidden)'); const prevStep = currentStep.previousElementSibling; if (prevStep) { currentStep.classList.add('hidden'); prevStep.classList.remove('hidden'); updateProgress(); } } function updateProgress() { // Update progress indicators const currentStep = document.querySelector('.tutorial-step:not(.hidden)'); const totalSteps = document.querySelectorAll('.tutorial-step').length; const step = currentStep.dataset.step; document.getElementById('current-step').textContent = step; document.getElementById('total-steps').textContent = totalSteps; const progress = (step / totalSteps) * 100; document.querySelector('.tutorial-progress .bg-accent').style.width = `${progress}%`; } window.addEventListener('resize', debounce(() => { const activeModal = document.querySelector('.fixed.inset-0'); if (activeModal) { const modalContent = activeModal.querySelector('.max-w-4xl, .max-w-6xl'); if (modalContent) { if (window.innerWidth <= 768) { modalContent.style.margin = '1rem'; modalContent.style.width = 'calc(100% - 2rem)'; } else { modalContent.style.margin = '5% auto'; modalContent.style.width = ''; } } } }, 250)); document.addEventListener('DOMContentLoaded', function () { initializeFilters(); document.getElementById('resourceTypeFilter').addEventListener('change', performSearch); document.getElementById('keywordFilter').addEventListener('input', debounce(performSearch, 300)); });-->
    Land Surveyors United Logo

    Land Surveying Resource Library

    Foundational Documents

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Standards and Ethics

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Legal Standards

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Compliance and Licensing

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Tools and Technology

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Software and Digital Tools

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Geodesy and Mapping

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Remote Sensing and UAVs

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Data Privacy and Security

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Risk and Disaster Management

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Continuing Education

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Standards and Certifications

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Professional Development

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Interdisciplinary Collaboration

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Applications in Industry

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Environment and Sustainability

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Land Use and Urban Planning

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Field Resources

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Historical and Cultural Resources

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Education and Public Engagement

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Innovations and Emerging Fields

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Hydrographic Surveying

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Community Engagement

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library

    Miscellaneous

    • Resources Available
    • Interactive Modules
    • Submit A Resource
    • Member Contribution Library