feat(map): streamline search and detail panels

This commit is contained in:
lingniu
2026-08-11 17:41:45 +08:00
parent c42570c0ee
commit f535b1570b
4 changed files with 1415 additions and 32 deletions
+40 -2
View File
@@ -8,7 +8,7 @@
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600;700;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css?v=20260804044000">
<link rel="stylesheet" href="styles.css?v=20260812113000">
<!-- 高德地图 (AutoNavi AMap) Web JS API v2.0 Configuration -->
<script type="text/javascript">
@@ -114,10 +114,48 @@
</div>
<div class="map-explore-toolbar" aria-label="地图筛选与定位">
<button class="locate-btn" id="locateDeviceBtn" type="button" onclick="locateDevice()" aria-label="定位到我的位置" title="定位到我的位置">
<svg viewBox="0 0 24 24" aria-hidden="true">
<circle cx="12" cy="12" r="3"></circle>
<path d="M12 2v3M12 19v3M2 12h3M19 12h3"></path>
<circle cx="12" cy="12" r="8"></circle>
</svg>
<span id="locateDeviceLabel" data-i18n="btnLocate">定位</span>
</button>
<div class="explore-search-shell">
<label class="entity-search-field" for="entitySearch">
<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="7"></circle><path d="m20 20-3.6-3.6"></path></svg>
<input id="entitySearch" type="search" autocomplete="off" placeholder="搜索位置、站点、车牌或 VIN" aria-label="搜索位置、站点、车牌或 VIN" oninput="handleExploreInput(this.value)" onfocus="openExploreSuggestions()" onkeydown="handleExploreSearchKeydown(event)">
<button class="search-clear-btn" id="searchClearBtn" type="button" onclick="clearNameFilter()" aria-label="清除名称筛选" hidden>×</button>
</label>
<div class="explore-suggestions" id="exploreSuggestions" role="listbox" aria-label="搜索建议" hidden></div>
</div>
<div class="filter-chip-rail" id="filterChipRail" aria-label="当前筛选" hidden></div>
<span class="filter-result-meta" id="filterResultMeta" aria-live="polite">全部 0</span>
<span class="location-feedback" id="locationFeedback" role="status" hidden></span>
</div>
<!-- AMap 3D Canvas -->
<div class="amap-canvas-box">
<div id="amapContainer"></div>
<article class="map-detail-card" id="mapDetailCard" aria-live="polite" hidden>
<div class="detail-card-accent" id="detailCardAccent"></div>
<div class="detail-card-header">
<div class="detail-title-wrap">
<span class="detail-type-pill" id="detailTypePill">车辆</span>
<h2 id="detailTitle"></h2>
<p id="detailSubtitle"></p>
</div>
<button class="detail-close-btn" type="button" onclick="closeEntityDetails()" aria-label="关闭详情">×</button>
</div>
<dl class="detail-grid" id="detailGrid"></dl>
<button class="detail-expand-btn" id="detailExpandBtn" type="button" onclick="toggleEntityDetails()" hidden>展开详情</button>
</article>
<!-- Bottom Right Floating Controls -->
<div class="map-action-controls">
<button class="glass-btn" onclick="resetMapView()" data-i18n="btnResetView">复位视角</button>
@@ -191,6 +229,6 @@
</div>
<script src="node_modules/pinyin-pro/dist/index.js?v=3.28.2"></script>
<script src="app.js?v=20260811170000"></script>
<script src="app.js?v=20260812113000"></script>
</body>
</html>