当前位置: 首页 > article >正文

uniapp 地图添加,删除,编辑标记,在地图中根据屏幕范围中呈现标记

前言

小程序实现新功能,在地图中选取位置添加标记,并在地图中呈现添加的标记,(呈现的是根据当前屏幕范围内的标记),并对标记进行分享,删除,编辑,导航,并从分享标记点位置打开页面的时候在呈现该标记的信息详情,

部分代码解释

scale:地图缩放级别
markers:标记点	
callouttap:标记点点击事件
markertap:markers内容的点击事件,就是自定义内容的点击事件
regionchange:推拽事件
regionchange - begin :拖拽开始事件
regionchange - end:拖拽结束事件
this.mapContext = uni.createMapContext("map", this); // 创建地图上下文
that.mapContext.getCenterLocation: 获取中心点位置
that.mapContext.getRegion : 获取后获取对角坐标
that.mapContext.getScale : 获取缩放级别

更多更详细地图上下文接口点击这里(uniapp官网,进去就是地图上下文相关)

uni.chooseLocation 和 uni.getLocation 使用的时候需要先声明
在这里插入图片描述

部分功能图片预览

声明:图片中内容为随机添加,内容也是胡乱写的

在这里插入图片描述

在这里插入图片描述

拖动地图,位置也会及时更新,选取添加的标记点位置
在这里插入图片描述

地图首页

添加修改标记页面和搜索页面就没必要放上来了,都是一些基础的样式和添加逻辑,根据个人情况写就行了,主要就是添加标记,(添加页面传递参数就是进度和纬度,有重要这两个数据就可以了),bijiaoInfos,就是分享和搜索页面传递过来的,根据id请求详情,拿到经纬度,把这个坐标定为中心点,再让地图重新加载,然后在自动弹出这个id的详情弹窗,就是示例的第二张图,通过搜索和分享进来看到的就是这个页面。

还有 - 记得点赞!!

<template><view><view class="search-box"><view class="search" @click="searchFocus"><text class="iconfont icon-sousuo-copy-copy"></text><text>请输入搜索内容</text><!-- <input type="text" v-model="search" @focus="searchFocus" placeholder="请输入搜索内容"> --></view></view><view class="titleNum">当前区域标记数量为: {{ titleNum }}</view><map id="map" class="map" style="width: 100%; height: 100vh;" :scale="scale" :latitude="latitude":longitude="longitude" :markers="covers" @callouttap='mapAction' @markertap="mapAction"@regionchange="regionchange"></map><uni-popup ref="popup" background-color="#fff"><view class="popup-content"><text @click="closePopup" class="iconfont icon-x"></text><view class="popup-content-top"><view>{{ bijiaoInfo.title }}</view><view>{{ bijiaoInfo.address }}</view></view><view class="popup-content-content"><view class="popup-content-title">备注</view><view class="popup-content-text">{{ bijiaoInfo.bz }}</view></view><view class="popup-content-content"><view class="popup-content-title">创建人</view><view class="popup-content-text">{{ bijiaoInfo.username }} - {{ bijiaoInfo.addtime }}</view></view><view class="popup-img"><image @click="previewImage(index)" v-for="item, index in bijiaoInfo.picurls_path" :key="index":src="item" mode="scaleToFill" /></view><view class="popup-bom"><view class="popup-bom-left"><view class="popup-bom-left-item del" @click="delBiaoJi"><text class="iconfont icon-shanchu"></text><text>删除</text></view><button open-type="share" class="popup-bom-left-item"><text class="iconfont icon-fenxiang"></text><text>分享</text></button><view class="popup-bom-left-item" @click="biaoJiSave"><text class="iconfont icon-beizhu"></text><text>编辑</text></view></view><view @click="goNavigation" class="popup-bom-right">导航</view></view></view></uni-popup><uni-popup ref="alertDialog" type="dialog"><uni-popup-dialog type="error" cancelText="取消" confirmText="确定" title="提示":content="'您确定要删除' + bijiaoInfo.title + '标记点吗?'" @confirm="dialogConfirm"></uni-popup-dialog></uni-popup><view @click="goMyLocation" class="iconfont icon-wodeweizhi"></view><view class="gongNeng"><view class="gongNeng-item" @click="quanLanAction"><view class="iconfont icon-quanlan"></view><view>全览</view></view><view class="gongNeng-item huadian" @click="biaoJiAction"><view class="iconfont icon-weizhi"></view><view>画点</view></view></view></view>
</template><script>export default {data() {return {titleNum: 0,currentLocation: {},scale: 14,// 地图缩放级别id: null, // title: 'map',// 地图中心点 为空 默认北京   latitude: null,longitude: null,covers: [],myLatitude: null,myLongitude: null,search: '',//搜索内容searchList: [],mapContext: '',//地图对象zuobiao: {},//拖拽坐标my_zuobiao: {},//我的坐标isMarking: false, // 标记模式开关centerMarker: null, // 中心点标记type: 'bottom',bijiaoInfo: {},currentPage: 1,totle_page: 0,}},onLoad(options) {console.log("options", JSON.parse(JSON.stringify(options)));if (options.id) {this.id = options.id;this.bijiaoInfos();}// this.biaojiIndex();uni.$on('callreload', () => {this.biaojiIndex();});this.getLocation();this.mapContext = uni.createMapContext("map", this); // 创建地图上下文this.getInitialFocusCoordinates(); // 获取首次屏幕对焦经纬度},onShow() {uni.getStorage({key: 'currentLocation',success: (res) => {this.currentLocation = res.data}})// latitude: 34.745982,郑州中心点// longitude: 113.658233, },// 下拉刷新// onPullDownRefresh() {//     this.getInitialFocusCoordinates(); // 获取首次屏幕对焦经纬度//     uni.showToast({//         title: '刷新成功',//         icon: 'success',//         duration: 1000//     })//     uni.stopPullDownRefresh(); // 停止刷新	// },methods: {searchFocus() {uni.navigateTo({url: '/biaoji/searchBiaoJi'})},getLocation() {uni.getLocation({type: 'wgs84', // 获取经纬度坐标accuracy: 'high', // 请求高精度位置success: (res) => {console.log("获取经纬度坐标", JSON.parse(JSON.stringify(res)));// that.latitude =  parseFloat(res.latitude.toFixed(5));// that.longitude =  parseFloat(res.longitude.toFixed(5));this.latitude = parseFloat(res.latitude.toFixed(5));this.longitude = parseFloat(res.longitude.toFixed(5));this.myLatitude = parseFloat(res.latitude.toFixed(5));;this.myLongitude = parseFloat(res.longitude.toFixed(5));;this.covers = [{id: 1,latitude: res.latitude,longitude: res.longitude,iconPath: '../static/imgs/map/我的位置.png',width: 25,height: 25,name: '我的位置',}]},fail: (err) => {console.error('获取位置信息失败', err);}});},// 分享过来传来的id 显示标记点详情async bijiaoInfos() {const res = await this.$axios("biaoji/biaojiInfo", {id: this.id,});console.log("标记地点详情", JSON.parse(JSON.stringify(res.data)));if (res.data.code == 0) {this.bijiaoInfo = res.data.result;const latitude = parseFloat(res.data.result.latitude)const longitude = parseFloat(res.data.result.longitude)this.mapContext.moveToLocation({latitude: latitude.toFixed(5),longitude: longitude.toFixed(5),success: () => {// 添加平滑过渡效果const timer = setTimeout(() => {// 在移动后更新缩放级别this.latitude = latitude.toFixed(5),this.longitude = longitude.toFixed(5),this.scale = 14; // 设置为更适合查看的缩放级别clearTimeout(timer);this.$refs.popup.open(this.type);}, 300); // 确保地图移动有足够的时间},fail: () => {uni.showToast({title: '移动到我的位置失败',icon: 'none',duration: 2000});}});}},// 回到我的位置goMyLocation() {// 检查用户位置是否可用if (this.myLatitude === null || this.myLongitude === null) {uni.showToast({title: '无法获取当前位置,请确保已授权定位服务',icon: 'none',duration: 2000});return;}// 使用 moveToLocation 平滑移动到用户的位置this.mapContext.moveToLocation({latitude: this.myLatitude,longitude: this.myLongitude,success: () => {// 添加平滑过渡效果const timer = setTimeout(() => {// 在移动后更新缩放级别this.latitude = this.myLatitude;this.longitude = this.myLongitude;this.scale = 16; // 缩放级别clearTimeout(timer);}, 300); // 确保地图移动有足够的时间},fail: () => {uni.showToast({title: '移动到我的位置失败',icon: 'none',duration: 2000});}});},// 全览quanLanAction() {if (this.myLatitude === null || this.myLongitude === null) {uni.showToast({title: '无法获取当前位置,请确保已授权定位服务',icon: 'none',duration: 2000});return;}// 使用 moveToLocation 平滑移动到用户的位置this.mapContext.moveToLocation({latitude: this.myLatitude,longitude: this.myLongitude,success: () => {// 添加平滑过渡效果const timer = setTimeout(() => {// 在移动后更新缩放级别this.latitude = this.myLatitude;this.longitude = this.myLongitude;this.scale = 11; // 缩放级别clearTimeout(timer);}, 300); // 确保地图移动有足够的时间},fail: () => {uni.showToast({title: '全览失败',icon: 'none',duration: 2000});}});},async GetMapData() {const res = await this.$axios("work/getMap", {lat: this.location.latitude,lon: this.location.longitude});console.log("当前位置的名称", JSON.parse(JSON.stringify(res)));if (res.data.code == 0) {this.location_data = res.data.result;} else {uni.showToast({title: res.data.msg,icon: 'none',duration: 1000})}},// 获取首次屏幕对焦经纬度getInitialFocusCoordinates() {this.mapContext.getRegion({success: (res) => {console.log("获取首次屏幕对焦经纬度", JSON.parse(JSON.stringify(res)));const northeast = res.northeast; // 东北角const southwest = res.southwest; // 西南角const zuobiao = {northeast: northeast,southwest: southwest};this.zuobiao = [zuobiao.northeast, zuobiao.southwest];this.biaojiIndex();},fail: (err) => {console.error('获取对焦经纬度失败:', err);}});},// 标记地点数据async biaojiIndex() {const res = await this.$axios("biaoji/biaojiIndex", {title: '',zuobiao: this.zuobiao,scale: this.scale,page: '',//页码limit: '',//每页数量})console.log("标记地点数据", JSON.parse(JSON.stringify(res.data)));if (res.data.code == 0) {this.titleNum = res.data.totle_num;this.covers = res.data.lists.map(item => {return {id: item.id,latitude: parseFloat(item.latitude),longitude: parseFloat(item.longitude),// iconPath: '/static/images/map.png',width: 22,height: 22,callout: {content: item.title,display: 'ALWAYS',color: '#ffffff',fontSize: 12,borderRadius: 4,bgColor: '#000',padding: '5',}}});} else {uni.showToast({title: res.data.msg,icon: 'none',duration: 1000})}},// 地图标记点点击事件async mapAction(e) {console.log("markers 内容的点击事件", JSON.parse(JSON.stringify(e)));this.$refs.popup.open(this.type);const res = await this.$axios("biaoji/biaojiInfo", {id: e.detail.markerId});console.log("标记地点详情", JSON.parse(JSON.stringify(res.data)));if (res.data.code == 0) {this.bijiaoInfo = res.data.result;}},//监听地图拖拽regionchange(data) {// console.log("拖拽", JSON.parse(JSON.stringify(data)));const that = this;if (data.type == "end") {// 获取拖拽后的中心点that.mapContext.getCenterLocation({success: function (res) {that.latitude = parseFloat(res.latitude.toFixed(5));that.longitude = parseFloat(res.longitude.toFixed(5));// 获取后获取对角坐标that.mapContext.getRegion({success: (res) => {const zuobiao = {northeast: res.northeast,southwest: res.southwest};that.zuobiao = [zuobiao.northeast, zuobiao.southwest];// 获取缩放级别that.mapContext.getScale({success: (res) => {if (res.scale !== that.scale) {that.scale = res.scale; // 更新缩放级别}}})that.biaojiIndex();}})}});}},// 添加标记点biaoJiAction() {uni.getSetting({success: (res) => {if (res.authSetting['scope.userLocation']) { /* 用户授权成功时走这里 */this.handerChooseLocation()} else if (res.authSetting['scope.userLocation'] === undefined) { /* 用户未授权时走这里 */console.log('没有授权')this.handleOpenSetting()} else { /* 用户拒绝了授权后走这里 */console.log('拒绝了授权 false')this.handleOpenSetting()}},})},handerChooseLocation() {uni.chooseLocation({latitude: this.latitude,longitude: this.longitude,success: (res) => {// console.log('wx.chooseLocation res=', res)uni.setStorageSync('currentLocation', res)uni.navigateTo({url: '/biaoji/biaojiInfo?status=1&res=' + JSON.stringify(res)})},fail: function (err) {console.log('取消按钮', err)}})},handleOpenSetting() {wx.openSetting({success: (res) => {console.log('定位 openSetting', res)if (res.authSetting["scope.userLocation"]) {this.handerChooseLocation()}}})},// 关闭弹窗closePopup() {this.$refs.popup.close();if (this.id != null) {this.getInitialFocusCoordinates(); // 获取首次屏幕对焦经纬度this.id = null;}},// 右上角分享onShareAppMessage() {return {title: this.bijiaoInfo.title,path: '/biaoji/biaoji?id=' + this.bijiaoInfo.id, //自定义路径// imageUrl: '分享图片链接',};},// 右上角分享到朋友圈onShareTimeline() {return {title: this.bijiaoInfo.title,path: '/biaoji/biaoji', //自定义路径// imageUrl: this.shareImg //自定义展示图片};},// 导航goNavigation() {// 导航跳转uni.openLocation({latitude: parseFloat(this.bijiaoInfo.latitude),longitude: parseFloat(this.bijiaoInfo.longitude),name: this.bijiaoInfo.title,address: this.bijiaoInfo.address,success: function (res) {console.log('打开系统位置地图成功')},fail: function (error) {console.log(error)}})},// 图片预览previewImage(index) {uni.previewImage({urls: this.bijiaoInfo.big_picurls,current: index, // 当前显示图片的索引loop: true // 是否开启图片轮播});},// 删除标记点async delBiaoJi() {this.$refs.alertDialog.open()},// 删除标记点async dialogConfirm() {const res = await this.$axios("biaoji/biaojiDel", {id: this.bijiaoInfo.id})console.log("删除标记点", JSON.parse(JSON.stringify(res)));if (res.data.code == 0) {this.$refs.popup.close()uni.showToast({title: '删除成功',icon: 'success',duration: 1000})this.getLocation();this.biaojiIndex();this.getInitialFocusCoordinates(); // 获取首次屏幕对焦经纬度} else {uni.showToast({title: res.data.msg,icon: 'none',duration: 1000})}},// 修改标记点biaoJiSave() {this.$refs.popup.close()uni.navigateTo({url: '/biaoji/biaojiInfo?status=2&id=' + this.bijiaoInfo.id})},}}
</script><style lang="scss" scoped>
.search-box {background-color: white;padding: 0.5rem 0;.search {width: 90%;margin: auto;display: flex;align-items: center;font-size: 14px;background-color: #f7f7f7;padding: 0.4rem;border-radius: 30px;.icon-sousuo-copy-copy {font-size: 14px;margin-right: 10px;margin-left: .5rem;}text {color: DarkGray;}}}.icon-wodeweizhi {position: fixed;left: 2%;bottom: 5%;background-color: white;padding: 0.5rem;z-index: 3;border-radius: 10px;
}.gongNeng {position: fixed;right: 2%;bottom: 5%;border-radius: 10px;background-color: white;padding: 0.5rem;z-index: 3;.gongNeng-item {font-size: 12px;text-align: center;}.huadian {margin-top: 0.5rem;.iconfont {margin-bottom: 0.3rem;}}
}.popup-content {position: relative;padding: 1rem 0;// font-size: 1px;.icon-x {position: absolute;top: 1rem;right: 1rem;font-size: 20px;}.popup-content-top {margin: 0 1rem;border-bottom: 1px solid #f7f7f7;padding-bottom: 0.5rem;view:nth-of-type(1) {font-size: 14px;margin-top: 0.3rem;font-weight: bold;}view:nth-of-type(2) {font-size: 10px;margin-top: 0.3rem;color: #666666;}}.popup-content-content {margin: 0 1rem;border-bottom: 1px solid #f7f7f7;padding-bottom: 0.5rem;.popup-content-text {margin-top: 0.3rem;font-size: 12px;}}.popup-content-title {font-weight: bold;font-size: 12px;margin-top: 0.3rem;}.popup-img {margin: 0.5rem 1rem;image {margin-right: 0.3rem;width: 80px;height: 80px;}}.popup-bom {margin: 0 1rem;margin-top: 3rem;display: flex;justify-content: space-between;align-items: center;border-top: 1px solid #f7f7f7;.popup-bom-left {display: flex;align-items: center;font-size: 12px;.popup-bom-left-item {.iconfont {margin-right: 0.2rem;}}.del {color: #f56c6c;}button {font-size: 12px;background-color: white;// height: 60px;}button::after {border: none;}}.popup-bom-right {color: white;background-color: #377fff;border-radius: 30px;padding: 0.3rem 0.8rem;font-size: 14px;text-align: center;}}
}.searchDialog {background-color: white;height: 50vh;
}.titleNum {position: fixed;left: 0.2rem;top: 3.5rem;background-color: white;padding: 0.3rem;z-index: 5;font-size: 14px;border-radius: 5px;
}
</style>

相关文章:

uniapp 地图添加,删除,编辑标记,在地图中根据屏幕范围中呈现标记

前言 小程序实现新功能&#xff0c;在地图中选取位置添加标记&#xff0c;并在地图中呈现添加的标记&#xff0c;&#xff08;呈现的是根据当前屏幕范围内的标记&#xff09;&#xff0c;并对标记进行分享&#xff0c;删除&#xff0c;编辑&#xff0c;导航&#xff0c;并从分…...

第 5 章:声音与音乐系统

5.1 声音效果的应用 在游戏中&#xff0c;声音效果是增强游戏沉浸感和趣味性的重要元素。Pygame 提供了强大的音频处理功能&#xff0c;使得添加各种声音效果变得相对简单。声音效果可以包括角色的动作音效&#xff0c;如跳跃、攻击、受伤时的声音&#xff1b;环境音效&#x…...

SOME/IP服务接口

本系列文章将分享我在学习 SOME/IP 过程中积累的一些感悟&#xff0c;并结合 SOME/IP 的理论知识进行讲解。主要内容是对相关知识的梳理&#xff0c;并结合实际代码展示 SOME/IP 的使用&#xff0c;旨在自我复习并与大家交流。文中引用了一些例图&#xff0c;但由于未能找到原作…...

NeetCode刷题第17天(2025.1.27)

文章目录 086 Course Schedule II 课程安排二087 Graph Valid Tree 图有效树088 Number of Connected Components in an Undirected Graph 无向图中的连接组件数量 086 Course Schedule II 课程安排二 您将获得一个数组 prerequisites &#xff0c;其中 prerequisites[i] [a,…...

c++学习第十四天

提示&#xff1a;以下是本篇文章正文内容&#xff0c;下面案例可供参考。 //力扣代码 class Solution {const char* numStrArr[10]{"","","abc","def","ghi","jkl","mno","pqrs","tuv&q…...

遗传算法【Genetic Algorithm(GA)】求解函数最大值(MATLAB and Python实现)

一、遗传算法基础知识 来自B站视频的笔记&#xff1a; 【超容易理解】手把手逐句带你解读并实现遗传算法的MATLAB编程&#xff08;结合理论基础&#xff09;_哔哩哔哩_bilibili 1、遗传算法 使用“适者生存”的原则&#xff0c;在遗传算法的每一代中&#xff0c;…...

MySQL 存储函数:数据库的自定义函数

在数据库开发中&#xff0c;存储函数&#xff08;Stored Function&#xff09;是一种非常有用的工具。它允许我们创建自定义的函数&#xff0c;这些函数可以在 SQL 查询中像内置函数一样使用&#xff0c;用于实现特定的逻辑和计算。本文将深入探讨 MySQL 存储函数的概念、与存储…...

【Rust自学】15.6. RefCell与内部可变性:“摆脱”安全性限制

题外话&#xff0c;这篇文章一共4050字&#xff0c;是截止到目前为止最长的文章&#xff0c;如果你能坚持读完并理解&#xff0c;那真的很强&#xff01; 喜欢的话别忘了点赞、收藏加关注哦&#xff08;加关注即可阅读全文&#xff09;&#xff0c;对接下来的教程有兴趣的可以…...

Luzmo 专为SaaS公司设计的嵌入式数据分析平台

Luzmo 是一款嵌入式数据分析平台&#xff0c;专为 SaaS 公司设计&#xff0c;旨在通过直观的可视化和快速开发流程简化数据驱动决策。以下是关于 Luzmo 的详细介绍&#xff1a; 1. 背景与定位 Luzmo 前身为 Cumul.io &#xff0c;专注于为 SaaS 公司提供嵌入式分析解决方案。…...

数组at()方法:负索引的救赎与JavaScript标准化之路

数组at()方法&#xff1a;负索引的救赎与JavaScript标准化之路 从一次代码评审说起 在某次团队代码评审中&#xff0c;小白注意到有同事写下了这样的代码&#xff1a; const lastItem arr[arr.length - 1];这让我回想起自己早期开发时被负索引问题困扰的经历。今天&#xf…...

HTML<label>标签

例子 三个带标签的单选按钮&#xff1a; <form action"/action_page.php"> <input type"radio" id"html" name"fav_language" value"HTML"> <label for"html">HTML</label><br&…...

约瑟夫问题(信息学奥赛一本通-2037)

【题目描述】 N个人围成一圈&#xff0c;从第一个人开始报数&#xff0c;数到M的人出圈&#xff1b;再由下一个人开始报数&#xff0c;数到M 的人出圈&#xff1b;…输出依次出圈的人的编号。 【输入】 输入N和M。 【输出】 输出一行&#xff0c;依次出圈的人的编号。 【输入样…...

二分查找题目:寻找两个正序数组的中位数

文章目录 题目标题和出处难度题目描述要求示例数据范围 解法一思路和算法代码复杂度分析 解法二思路和算法代码复杂度分析 题目 标题和出处 标题&#xff1a;寻找两个正序数组的中位数 出处&#xff1a;4. 寻找两个正序数组的中位数 难度 8 级 题目描述 要求 给定两个大…...

【技术洞察】2024科技绘卷:浪潮、突破、未来

涌动与突破 2024年&#xff0c;科技的浪潮汹涌澎湃&#xff0c;人工智能、量子计算、脑机接口等前沿技术如同璀璨星辰&#xff0c;方便了大家的日常生活&#xff0c;也照亮了人类未来的道路。这一年&#xff0c;科技的突破与创新不断刷新着人们对未来的想象。那么回顾2024年的科…...

【Linux】gdb——Linux调试器

gdb使用背景 程序的发布方式有两种&#xff0c;debug模式和release模式 Linux gcc/g出来的二进制程序&#xff0c;默认是release模式 要使用gdb调试&#xff0c;必须在源代码生成二进制程序的时候, 加上 -g 选项 gdb使用方法 首先进入gdb gdb test_glist显示代码 断点 b 行…...

fpga系列 HDL:XILINX Vivado Vitis 高层次综合(HLS) 实现 EBAZ板LED控制(上)

目录 创建工程创建源文件并编写C代码C仿真综合仿真导出RTL CG导出RTL错误处理&#xff1a; 创建工程 创建源文件并编写C代码 创建源文件(Souces下的hlsv.h和hlsv.cpp&#xff0c;Test Bench下的test_hlsv1.cpp)&#xff1a; hlsv1.h #ifndef HLSV1 #define HLSV1 #include &l…...

卡特兰数学习

1&#xff0c;概念 卡特兰数&#xff08;英语&#xff1a;Catalan number&#xff09;&#xff0c;又称卡塔兰数&#xff0c;明安图数。是组合数学中一种常出现于各种计数问题中的数列。它在不同的计数问题中频繁出现。 2&#xff0c;公式 卡特兰数的递推公式为&#xff1a;f(…...

度小满Java开发面试题及参考答案 (上)

String 是基本类型吗?String、StringBuffer、StringBuilder 的区别是什么?拼接字符串有哪些做法? String 不是基本类型,它是 Java 中的一个类,属于引用类型。 下面来看看 String、StringBuffer、StringBuilder 的区别: 类型可变性线程安全性性能适用场景String不可变线程…...

Python-基于PyQt5,json和playsound的通用闹钟

前言&#xff1a;刚刚结束2024年秋季学期的学习&#xff0c;接下来我们继续来学习PyQt5。由于之前我们已经学习了PyQt5以及PyUIC,Pyrcc和QtDesigner的安装&#xff0c;配置。所以接下来我们一起深入PyQt5&#xff0c;学习如何利用PyQt5进行实际开发-基于PyQt5&#xff0c;json和…...

关于数字地DGND和模拟地AGND隔离

文章目录 前言一、1、为什么要进行数字地和模拟地隔离二、隔离元件1.①0Ω电阻&#xff1a;2.②磁珠&#xff1a;3.电容&#xff1a;4.④电感&#xff1a; 三、隔离方法①单点接地②数字地与模拟地分开布线&#xff0c;最后再PCB板上一点接到电源。③电源隔离④、其他隔离方法 …...

小识Java死锁是否会造成CPU100%?

死锁或者大量的死锁不一定会直接导致CPU占用率达到100%。以下是详细分析&#xff1a; 一、死锁对CPU的影响 资源占用&#xff1a;死锁是指两个或多个线程&#xff08;或进程&#xff09;在相互等待对方释放资源&#xff0c;导致所有涉及的线程都无法继续执行。在死锁状态下&a…...

DeepSeek R1学习

0.回顾&#xff1a; https://blog.csdn.net/Together_CZ/article/details/144431432?ops_request_misc%257B%2522request%255Fid%2522%253A%25226574a586f0850d0329fbb720e5b8d5a9%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id…...

激光线扫相机无2D图像的标定方案

方案一&#xff1a;基于运动控制平台的标定 适用场景&#xff1a;若激光线扫相机安装在可控运动平台&#xff08;如机械臂、平移台、旋转台&#xff09;上&#xff0c;且平台的运动精度已知&#xff08;例如通过编码器或高精度步进电机控制&#xff09;。 步骤&#xff1a; 标…...

12 款开源OCR发 PDF 识别框架

2024 年 12 款开源文档解析框架的选型对比评测&#xff1a;PDF解析、OCR识别功能解读、应用场景分析及优缺点比较 这是该系列的第二篇文章&#xff0c;聚焦于智能文档处理&#xff08;特别是 PDF 解析&#xff09;。无论是在模型预训练的数据收集阶段&#xff0c;还是基于 RAG…...

【反悔堆】【hard】力扣871. 最低加油次数

汽车从起点出发驶向目的地&#xff0c;该目的地位于出发位置东面 target 英里处。 沿途有加油站&#xff0c;用数组 stations 表示。其中 stations[i] [positioni, fueli] 表示第 i 个加油站位于出发位置东面 positioni 英里处&#xff0c;并且有 fueli 升汽油。 假设汽车油…...

为什么应用程序是特定于操作系统的?[计算机原理]

你把WINDOWS程序复制到MAC上使用&#xff0c;会发现无法运行。你可能会说&#xff0c;MAC是arm处理器&#xff0c;而WINDWOS是X86 处理器。但是在2019年&#xff0c;那时候MAC电脑还全是Intel处理器&#xff0c;在同样的X86芯片上&#xff0c;运行MAC和WINDOWS 程序还是无法互相…...

多项日常使用测试,带你了解如何选择AI工具 Deepseek VS ChatGpt VS Claude

多项日常使用测试&#xff0c;带你了解如何选择AI工具 Deepseek VS ChatGpt VS Claude 注&#xff1a;因为考虑到绝大部分人的使用&#xff0c;我这里所用的模型均为免费模型。官方可访问的。ChatGPT这里用的是4o Ai对话&#xff0c;编程一直以来都是人们所讨论的话题。Ai的出现…...

什么是循环神经网络?

一、概念 循环神经网络&#xff08;Recurrent Neural Network, RNN&#xff09;是一类用于处理序列数据的神经网络。与传统的前馈神经网络不同&#xff0c;RNN具有循环连接&#xff0c;可以利用序列数据的时间依赖性。正因如此&#xff0c;RNN在自然语言处理、时间序列预测、语…...

Flink运行时架构

一、系统架构 1&#xff09;作业管理器&#xff08;JobManager&#xff09; JobManager是一个Flink集群中任务管理和调度的核心&#xff0c;是控制应用执行的主进程。也就是说&#xff0c;每个应用都应该被唯一的JobManager所控制执行。 JobManger又包含3个不同的组件。 &am…...

网络工程师 (6)操作系统概述

一、操作系统的定义 &#xff08;一&#xff09;基本定义 操作系统&#xff08;Operating System&#xff0c;简称OS&#xff09;是计算机系统中至关重要的基础性系统软件。它是计算机硬件与上层软件之间的桥梁&#xff0c;负责管理和控制整个计算机系统的硬件和软件资源&…...