Files
Meshtastic-Android/api/feature/map/org.meshtastic.feature.map/-map-node-policy/visible-nodes.html
T

117 lines
9.8 KiB
HTML

<!doctype html>
<html class="no-js" lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
<title>visibleNodes</title>
<link href="../../../../images/logo-icon.svg" rel="icon" type="image/svg"><script>var pathToRoot = "../../../../";</script>
<script>document.documentElement.classList.replace("no-js", "js");</script>
<script>const storage = localStorage.getItem("dokka-dark-mode")
if (storage == null) {
const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
if (osDarkSchemePreferred === true) {
document.getElementsByTagName("html")[0].classList.add("theme-dark")
}
} else {
const savedDarkMode = JSON.parse(storage)
if (savedDarkMode === true) {
document.getElementsByTagName("html")[0].classList.add("theme-dark")
}
}
</script>
<script type="text/javascript" src="../../../../scripts/sourceset_dependencies.js" async></script>
<link href="../../../../styles/style.css" rel="Stylesheet">
<link href="../../../../styles/main.css" rel="Stylesheet">
<link href="../../../../styles/prism.css" rel="Stylesheet">
<link href="../../../../styles/logo-styles.css" rel="Stylesheet">
<link href="../../../../ui-kit/ui-kit.min.css" rel="Stylesheet">
<script type="text/javascript" src="../../../../scripts/safe-local-storage_blocking.js"></script>
<script type="text/javascript" src="../../../../scripts/navigation-loader.js" async></script>
<script type="text/javascript" src="../../../../scripts/platform-content-handler.js" async></script>
<script type="text/javascript" src="../../../../scripts/main.js" defer></script>
<script type="text/javascript" src="../../../../scripts/prism.js" async></script>
<script type="text/javascript" src="../../../../ui-kit/ui-kit.min.js" defer></script></head>
<body>
<div class="root">
<header class="navigation theme-dark" id="navigation-wrapper" role="banner">
<a class="library-name--link" href="../../../../index.html" tabindex="1">
Meshtastic App
</a> <button class="navigation-controls--btn navigation-controls--btn_toc ui-kit_mobile-only" id="toc-toggle" type="button">Toggle table of contents
</button>
<div class="navigation-controls--break ui-kit_mobile-only"></div>
<div class="library-version" id="library-version">
</div>
<div class="navigation-controls">
<ul class="filter-section filter-section_loading" id="filter-section" aria-label="Target filter">
<button class="platform-tag platform-selector common-like" data-active="" aria-pressed="true" data-filter=":feature:map/commonMain">common</button>
<div class="dropdown filter-section--dropdown" data-role="dropdown" id="filter-section-dropdown">
<button class="button button_dropdown filter-section--dropdown-toggle" role="combobox" data-role="dropdown-toggle" aria-controls="platform-tags-listbox" aria-haspopup="listbox" aria-expanded="false" aria-label="Toggle source sets"></button>
<ul role="listbox" id="platform-tags-listbox" class="dropdown--list" data-role="dropdown-listbox" aria-label="Target filter">
<div class="dropdown--header"><span>Target filter</span>
<button class="button" data-role="dropdown-toggle" aria-label="Close target filter">
<i class="ui-kit-icon ui-kit-icon_cross"></i>
</button>
</div>
<li role="option" class="dropdown--option platform-selector-option common-like" tabindex="0">
<label class="checkbox">
<input type="checkbox" class="checkbox--input" id=":feature:map/commonMain" data-filter=":feature:map/commonMain">
<span class="checkbox--icon"></span>
common
</label>
</li>
</ul>
<div class="dropdown--overlay"></div>
</div>
</ul>
<button class="navigation-controls--btn navigation-controls--btn_theme" id="theme-toggle-button" type="button">Switch theme
</button>
<div class="navigation-controls--btn navigation-controls--btn_search" id="searchBar" role="button">Search in
API
</div>
</div>
</header>
<div id="container">
<nav id="leftColumn" class="sidebar" data-item-type="SECTION" data-item-config="{&quot;defaultSize&quot;: 280, &quot;minSize&quot;: 200, &quot;maxSize&quot;: 400}">
<a class="toc--skip-link" href="#main">Skip to content</a>
<div class="dropdown theme-dark_mobile" data-role="dropdown" id="toc-dropdown">
<ul role="listbox" id="toc-listbox" class="dropdown--list dropdown--list_toc-list" data-role="dropdown-listbox" aria-label="Table of contents">
<div class="dropdown--header">
<span>
Meshtastic App
</span>
<button class="button" data-role="dropdown-toggle" aria-label="Close table of contents">
<i class="ui-kit-icon ui-kit-icon_cross"></i>
</button>
</div>
<div class="sidebar--inner" id="sideMenu"></div>
</ul>
<div class="dropdown--overlay"></div>
</div>
</nav>
<div id="resizer" class="resizer" data-item-type="BAR"></div>
<div id="main" data-item-type="SECTION" role="main">
<div class="main-content" data-page-type="member" id="content" pageids="feature-map::org.meshtastic.feature.map/MapNodePolicy/visibleNodes/#kotlin.collections.List[org.meshtastic.core.model.Node]#org.meshtastic.feature.map.BaseMapViewModel.MapFilterState#kotlin.Long#kotlin.Int?/PointingToDeclaration//-1707802287">
<div class="breadcrumbs"><a href="../../index.html">feature-map</a><span class="delimiter">/</span><a href="../index.html">org.meshtastic.feature.map</a><span class="delimiter">/</span><a href="index.html">MapNodePolicy</a><span class="delimiter">/</span><span class="current">visibleNodes</span></div>
<div class="cover ">
<h1 class="cover"><span>visible</span><wbr><span><span>Nodes</span></span></h1>
</div>
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":feature:map/commonMain"><div class="symbol monospace"><span class="token keyword">fun </span><a href="visible-nodes.html"><span class="token function">visibleNodes</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">nodes<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html">List</a><span class="token operator">&lt;</span><a href="../../../../core/model/org.meshtastic.core.model/-node/index.html">Node</a><span class="token operator">&gt;</span><span class="token punctuation">, </span></span><span class="parameter ">filterState<span class="token operator">: </span><a href="../-base-map-view-model/-map-filter-state/index.html">BaseMapViewModel.MapFilterState</a><span class="token punctuation">, </span></span><span class="parameter ">nowSeconds<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html">Long</a><span class="token punctuation">, </span></span><span class="parameter ">myNodeNum<span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html">Int</a><span class="token operator">?</span></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html">List</a><span class="token operator">&lt;</span><a href="../../../../core/model/org.meshtastic.core.model/-node/index.html">Node</a><span class="token operator">&gt;</span><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/feature/map/src/commonMain/kotlin/org/meshtastic/feature/map/MapNodePolicy.kt#L60">source</a>)</span></span></div><p class="paragraph">Applies the map's filter chips to the node list.</p><p class="paragraph">Pure so it can be tested without a renderer: the filter rules are the part users notice when they go wrong, and they should not need a GPU to verify.</p><p class="paragraph">Your own node is exempt from both filters. You are always on your own map, whether or not you have favourited yourself and whether or not you have heard from yourself lately — the Google map has always done this, and the MapLibre map's own copy of these rules did not, so filtering to favourites there hid you from yourself.</p><p class="paragraph">Nodes without a fix are dropped up front. They cannot be drawn, and leaving them in drags a camera that fits to these bounds toward (0, 0) — which is how the OSMdroid map used to open in the Atlantic.</p></div></div>
</div>
<div class="footer">
<div class="footer--container">
<a href="#content" id="go-to-top-link" class="footer--button footer--button_go-to-top"></a>
<div class="footer--content">
<div>
<span>Generated by </span>
<a class="footer--link footer--link_external" href="https://github.com/Kotlin/dokka">
Dokka
</a>
<div>© 2026 Copyright</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>