百度地图SDK Android版开发 8 覆盖物示例2动画

news2024/9/21 4:36:02

百度地图SDK Android版开发 8 覆盖物示例2动画

  • 前言
  • 动画相关的类和接口
    • 帧动画
      • MarkerOptions
    • 加载动画
      • MarkerOptions
      • MarkerOptions.MarkerAnimateType 动画类型
    • Animation动画
      • Marker
      • Animation类及其子类
        • Animation
        • Transformation
        • RotateAnimation
        • AlphaAnimation
        • ScaleAnimation
        • SingleScaleAnimation
        • AnimationSet
  • Marker动画示例
    • 界面布局
    • MapMarkAnimate类
      • 常量
      • 成员变量
      • 初始值
      • 创建覆盖物
        • 创建Marker(帧动画)
        • 创建Marker(加载动画)
        • 创建Marker(Animation动画)
        • 创建Animation
      • 移除覆盖物
      • 设置属性
      • 加载地图和释放地图
    • MapMarkerAnimationActivity类
      • 控件响应事件
    • 运行效果图

前言

前文介绍了百度地图Marker支持多种动画类型:

  • 帧动画;
  • 加载动画(包括从天上掉下、从地下生长和跳跃动画);
  • Animation动画(包括平移、旋转、透明、缩放、单边缩放和组合动画)。

本文重点介绍Marker动画相关的类和接口,以及示例代码。

动画相关的类和接口

帧动画

帧动画的功能通过MarkerOptions类来设置,一次传入一个Icon列表,通过period设定刷新的帧间隔。

MarkerOptions

类型方法说明
MarkerOptionsicons(ArrayList< BitmapDescriptor > icons)设置 Marker 覆盖物的图标,相同图案的 icon 的 marker 最好使用同一个 BitmapDescriptor 对象以节省内存空间。
MarkerOptionsperiod(int period)设置多少帧刷新一次图片资源,Marker动画的间隔时间,值越小动画越快。
MarkerOptionsinterval(int mInterval)v7.6.0新增接口。设置marker多帧图片播放时间间隔(ms)。 地图绘制方式升级为overlay2.0时,该接口生效。

加载动画

自v3.6.0版本起,SDK提供了加载Marker时的动画效果,通过animateType设置动画类型。

MarkerOptions

类型方法说明
MarkerOptionsanimateType(MarkerOptions.MarkerAnimateType type)设置marker动画类型,见 MarkerAnimateType(从天上掉下,从地下生长,跳跃),默认无动画

MarkerOptions.MarkerAnimateType 动画类型

位置说明
MarkerOptions.MarkerAnimateType.none没效果
MarkerOptions.MarkerAnimateType.drop从天上掉下
MarkerOptions.MarkerAnimateType.grow从地面生长
MarkerOptions.MarkerAnimateType.jump跳动

Animation动画

Marker还支持设置旋转、缩放、平移、透明和组合动画效果。通过Marker类setAnimation方法设置。

Marker

类型方法说明
voidsetAnimation(Animation animation)设置 Marker 覆盖物的动画
voidsetAnimation(Animation animation, TypeEvaluator typeEvaluator)设置 Marker 覆盖物的动画与估值器
voidstartAnimation()开启 Marker 覆盖物的动画
voidcancelAnimation()取消 Marker 覆盖物的动画

Animation类及其子类

动画类别说明
抽象类AnimationMarker 动画接口类
平移动画TransformationMarker 平移动画接口类
旋转动画RotateAnimationMarker 旋转动画接口类
透明度动画AlphaAnimationMarker 透明动画接口类
缩放动画ScaleAnimationMarker 缩放动画接口类
单边缩放动画(X或Y方向)SingleScaleAnimationMarker X或Y方向单独缩放动画类
组合动画AnimationSetMarker 动画集合接口类
Transformation
+Transformation(LatLng... values)
+void setRepeatCount(repeatCount)
+void setRepeatMode(repeatMode)
Animation
+long getDuration()
+int getRepeatCount()
+Animation.RepeatMode getRepeatMode()
+abstract void setDuration(duration)
+abstract void setAnimationListener(animationListener)
+abstract void setInterpolator(interpolator)
+abstract void cancel()
RotateAnimation
+RotateAnimation(fromDegrees, toDegrees)
+void setRepeatCount(repeatCount)
+void setRepeatMode(repeatMode)
AlphaAnimation
+AlphaAnimation(float... alpha)
+void setRepeatCount(repeatCount)
+void setRepeatMode(repeatMode)
ScaleAnimation
+ScaleAnimation(float... scale)
+void setRepeatCount(repeatCount)
+void setRepeatMode(repeatMode)
SingleScaleAnimation
+SingleScaleAnimation(scaleType, float... scale)
+void setRepeatCount(repeatCount)
+void setRepeatMode(repeatMode)
AnimationSet
+AnimationSet()
+void addAnimation(animation)
+void setAnimatorSetMode(combinationMode)
Animation
类型方法说明
longgetDuration()获取设置动画持续时间
intgetRepeatCount()获取动画重复执行的次数。默认为0
Animation.RepeatModegetRepeatMode()重复模式
abstract voidsetAnimationListener(Animation.AnimationListener animationListener)设置 Marker 动画监听
abstract voidsetDuration(long duration)设置 Marker 动画执行时间
abstract voidsetInterpolator(Interpolator interpolator)设置 Marker 动画插值器
abstract voidcancel()取消 Marker 动画
  • Animation.RepeatMode 重复执行模式
枚举常量说明
Animation.RepeatMode.RESTART动画结束后从头播放,最大重复次数受RepeatCount限制
Animation.RepeatMode.REVERSE动画结束后从尾倒放,最大重复次数受RepeatCount限制
  • AnimationListener 动画侦听
// 动画侦听
public interface AnimationListener {
    // 动画开始回调
    void onAnimationStart();

    // 动画结束回调
    void onAnimationEnd();

    // 动画取消回调
    void onAnimationCancel();

    // 动画重复回调
    void onAnimationRepeat();
}
Transformation
说明说明
Transformation(LatLng… values)构造
Transformation(Point… values)构造
voidsetRepeatCount(int repeatCount)设置 Marker 动画重复次数
voidsetRepeatMode(Animation.RepeatMode repeatMode)设置 Marker 动画重复模式
RotateAnimation
说明说明
RotateAnimation(float fromDegrees, float toDegrees)构造
floatgetFromDegrees()
floatgetToDegrees()
voidsetRepeatCount(int repeatCount)设置 Marker 动画重复次数
voidsetRepeatMode(Animation.RepeatMode repeatMode)设置 Marker 动画重复模式
AlphaAnimation
说明说明
AlphaAnimation(float… alpha)
float[]getAlpha()
voidsetRepeatCount(int repeatCount)设置 Marker 动画重复次数
voidsetRepeatMode(Animation.RepeatMode repeatMode)设置 Marker 动画重复模式
ScaleAnimation
说明说明
ScaleAnimation(float… scale)
float[]getScale()
voidsetRepeatCount(int repeatCount)设置 Marker 动画重复次数
voidsetRepeatMode(Animation.RepeatMode repeatMode)设置 Marker 动画重复模式
SingleScaleAnimation
说明说明
SingleScaleAnimation(SingleScaleAnimation.ScaleType scaleType, float… scale)
float[]getScale()
SingleScaleAnimation.ScaleTypegetScaleType()
voidsetRepeatCount(int repeatCount)设置 Marker 动画重复次数
voidsetRepeatMode(Animation.RepeatMode repeatMode)设置 Marker 动画重复模式
  • SingleScaleAnimation.ScaleType 单边缩放类型
枚举常量说明
SingleScaleAnimation.ScaleType.SCALE_XMarker X方向单独缩放动画
SingleScaleAnimation.ScaleType.SCALE_YMarker Y方向单独缩放动画
AnimationSet
说明说明
AnimationSet()构造
voidaddAnimation(Animation animation)向 Marker 动画集合中添加动画
voidsetAnimatorSetMode(int combinationMode)设置 Marker 集合动画播放模式 0:组合播放 1:顺序播放

Marker动画示例

界面布局

在这里插入图片描述

  • 布局文件
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MapMarkerAnimationActivity">

    <com.baidu.mapapi.map.MapView
        android:id="@+id/bmapView"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:clickable="true"
        app:layout_constraintBottom_toTopOf="@id/bottomView"
        app:layout_constraintTop_toTopOf="parent" />

    <androidx.appcompat.widget.LinearLayoutCompat
        android:id="@+id/bottomView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toBottomOf="@id/bmapView">

        <RadioGroup
            android:id="@+id/RadioGroup"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@android:color/background_dark"
            android:gravity="center_horizontal"
            android:orientation="horizontal"
            android:paddingHorizontal="10dp">

            <RadioButton
                android:id="@+id/frameAnimation"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:checked="true"
                android:onClick="setAnimationFlag"
                android:text="帧动画"
                android:textColor="@color/white"
                android:textStyle="bold" />

            <RadioButton
                android:id="@+id/loadAnimation"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:onClick="setAnimationFlag"
                android:text="加载动画"
                android:textColor="@color/white"
                android:textStyle="bold" />

            <RadioButton
                android:id="@+id/animation"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:onClick="setAnimationFlag"
                android:text="Animation动画"
                android:textColor="@color/white"
                android:textStyle="bold" />

        </RadioGroup>

    </androidx.appcompat.widget.LinearLayoutCompat>
</androidx.constraintlayout.widget.ConstraintLayout>

MapMarkAnimate类

  • 以下是MapMarkAnimate部分代码。

常量

public final static String FRAME_ANIMATION = "Frame"; // 帧动画

public final static String DROP_ANIMATION = "Drop"; // 加载动画 从天上掉下
public final static String GROW_ANIMATION = "Grow"; // 加载动画 从地下生长
public final static String JUMP_ANIMATION = "Jump"; // 加载动画 跳跃

public final static String TRANSFORMATION_ANIMATION = "Transformation"; // 平移动画
public final static String ROTATE_ANIMATION = "Rotate"; // 旋转动画
public final static String ALPHA_ANIMATION = "Alpha"; // 透明度动画
public final static String SCALE_ANIMATION = "Scale"; // 缩放动画
public final static String SINGLE_SCALE_ANIMATION = "SingleScale"; // 单边缩放动画 X或Y方向
public final static String ANIMATION_SET = "AnimationSet"; // 组合动画

成员变量

// 覆盖物列表
List<Overlay> overlays = new ArrayList<>();
// 选中的状态
List<String> selectedFlags = new ArrayList<>();
// 坐标点集
List<LatLng> points = new ArrayList<>();

ArrayList<BitmapDescriptor> bitmaps = new ArrayList<>();

初始值

selectedFlags.add(FRAME_ANIMATION);
selectedFlags.add(FRAME_ANIMATION);
selectedFlags.add(FRAME_ANIMATION);

points.add(new LatLng(39.97923, 116.357428));
points.add(new LatLng(39.94923, 116.397428));
points.add(new LatLng(39.97923, 116.437428));
points.add(new LatLng(39.92353, 116.490705));
points.add(new LatLng(40.023537, 116.289429));
points.add(new LatLng(40.022211, 116.406137));

// 相同图案的 icon 的 marker 最好使用同一个 BitmapDescriptor 对象以节省内存空间。
int[] drawableIds = BubbleIcons.Number;
for (int drawableId : drawableIds) {
    BitmapDescriptor bitmap = BitmapDescriptorFactory.fromResource(drawableId);
    bitmaps.add(bitmap);
}

创建覆盖物

public void addMarkers() {
    if (selectedFlags.isEmpty())
        return;

    int markerSize = selectedFlags.size();
    for (int i = 0; i < markerSize; ++i) {
        LatLng point = points.get(i);
        String flag = selectedFlags.get(i);
        switch (flag) {
        case FRAME_ANIMATION:
            addFrameAnimation(point, bitmaps);
            break;
        case DROP_ANIMATION:
        case GROW_ANIMATION:
        case JUMP_ANIMATION:
            addLoadAnimation(point, bitmaps.get(i), flag);
            break;
        default:
            addAnimation(point, bitmaps.get(i), flag);
            break;
        }
    }
}
创建Marker(帧动画)
MarkerOptions option = new MarkerOptions()
        .position(point)
        .icons(bitmaps) // 设置覆盖物的图标
        .period(10); // 设置多少帧刷新一次图片资源,值越小动画越快 默认为20,最小为1

Marker marker = (Marker) map.addOverlay(option);
overlays.add(marker);
创建Marker(加载动画)
private void addLoadAnimation(LatLng point, BitmapDescriptor bitmap, String flag) {
    MarkerOptions.MarkerAnimateType type = MarkerOptions.MarkerAnimateType.none;
    switch (flag) {
    case DROP_ANIMATION:
        type = MarkerOptions.MarkerAnimateType.drop;
        break;
    case GROW_ANIMATION:
        type = MarkerOptions.MarkerAnimateType.grow;
        break;
    case JUMP_ANIMATION:
        type = MarkerOptions.MarkerAnimateType.jump;
        break;
    }

    if (type == MarkerOptions.MarkerAnimateType.none)
        return;

    MarkerOptions option = new MarkerOptions()
            .position(point) // 设置覆盖物的位置坐标
            .icon(bitmap) // 设置覆盖物的图标,
            .animateType(type); // 设置动画类型

    Marker marker = (Marker) map.addOverlay(option);
    overlays.add(marker);
}
创建Marker(Animation动画)
private void addAnimation(LatLng point, BitmapDescriptor bitmap, String flag) {
    Animation animation = null;
    switch (flag) {
    case TRANSFORMATION_ANIMATION:
        animation = getTransformation(point);
        break;
    case ROTATE_ANIMATION:
        animation = getRotateAnimation();
        break;
    case ALPHA_ANIMATION:
        animation = getAlphaAnimation();
        break;
    case SCALE_ANIMATION:
        animation = getScaleAnimation();
        break;
    case SINGLE_SCALE_ANIMATION:
        animation = getSingleScaleAnimation();
        break;
    case ANIMATION_SET:
        animation = getAnimationSet();
        break;
    }

    if (animation == null)
        return;

    MarkerOptions option = new MarkerOptions()
            .position(point)
            .icon(bitmap);

    Marker marker = (Marker) map.addOverlay(option);
    overlays.add(marker);
    marker.setAnimation(animation);
    marker.startAnimation();
}
创建Animation
  • 创建平移动画、旋转动画、透明度动画、缩放动画、单边缩放动画、创建组合动画。
// 创建平移动画
Animation getTransformation(LatLng point) {
    Point pt1 = map.getProjection().toScreenLocation(point);
    Point pt2 = new Point(pt1.x, pt1.y - 100);
    LatLng toPoint = map.getProjection().fromScreenLocation(pt2);

    Transformation animation = new Transformation(point, toPoint, point);

    // 设置动画执行时间
    animation.setDuration(500);
    // 设置动画重复模式
    animation.setRepeatMode(Animation.RepeatMode.RESTART);
    // 设置动画重复次数
    animation.setRepeatCount(1);

    animation.setAnimationListener(new Animation.AnimationListener() {
        @Override
        public void onAnimationStart() {
        }

        @Override
        public void onAnimationEnd() {
        }

        @Override
        public void onAnimationCancel() {
        }

        @Override
        public void onAnimationRepeat() {

        }
    });

    return animation;
}

// 创建旋转动画
Animation getRotateAnimation() {
    RotateAnimation animation = new RotateAnimation(0f, 360f);

    // 设置动画执行时间
    animation.setDuration(1000);
    // 设置动画重复模式
    animation.setRepeatMode(Animation.RepeatMode.RESTART);
    // 设置动画重复次数
    animation.setRepeatCount(1);

    setAnimationListener(animation);

    return animation;
}

// 创建透明度动画
Animation getAlphaAnimation() {
    AlphaAnimation animation = new AlphaAnimation(1f, 0f, 1f);

    // 设置动画执行时间
    animation.setDuration(3000);
    // 设置动画重复模式
    animation.setRepeatMode(Animation.RepeatMode.RESTART);
    // 设置动画重复次数
    animation.setRepeatCount(1);

    setAnimationListener(animation);

    return animation;
}

// 创建缩放动画
Animation getScaleAnimation() {
    float scale1 = 1.0f;
    float scale2 = 2.0f;
    ScaleAnimation animation = new ScaleAnimation(scale1, scale2, scale1);

    // 设置动画执行时间
    animation.setDuration(2000);
    // 设置动画重复模式
    animation.setRepeatMode(Animation.RepeatMode.RESTART);
    // 设置动画重复次数
    animation.setRepeatCount(1);

    setAnimationListener(animation);
    return animation;
}

// 创建单边缩放动画
Animation getSingleScaleAnimation() {
    SingleScaleAnimation.ScaleType scaleType = SingleScaleAnimation.ScaleType.SCALE_X;
    float scale1 = 1.0f;
    float scale2 = 2.0f;
    SingleScaleAnimation animation = new SingleScaleAnimation(scaleType,
            scale1, scale2, scale1);

    // 设置动画执行时间
    animation.setDuration(1000);
    // 设置动画重复模式
    animation.setRepeatMode(Animation.RepeatMode.RESTART);
    // 设置动画重复次数
    animation.setRepeatCount(1);

    setAnimationListener(animation);
    return animation;
}

// 创建组合动画
Animation getAnimationSet() {
    // 动画集合接口类
    AnimationSet animation = new AnimationSet();

    // 向动画集合中添加动画
    animation.addAnimation(getAlphaAnimation());
    animation.addAnimation(getRotateAnimation());
    animation.addAnimation(getSingleScaleAnimation());
    animation.addAnimation(getScaleAnimation());

    // 设置集合动画播放模式 0:组合播放 1:顺序播放
    animation.setAnimatorSetMode(0);
    // 设置动画插值器
    animation.setInterpolator(new LinearInterpolator());

    setAnimationListener(animation);
    return animation;
}

移除覆盖物

public void removeOverlay() {
    //map.removeOverLays(overlays);
    for (Overlay overlay : overlays) {
        if (overlay instanceof Marker) {
            ((Marker) overlay).cancelAnimation();
        }
        overlay.remove();
    }
    overlays.clear();
}

设置属性

public void setFlags(List<String> flags) {
    selectedFlags.clear();
    selectedFlags.addAll(flags);

    removeOverlay();
    addMarkers();
}

加载地图和释放地图

public void onMapLoaded() {
    addMarkers();
}

public void onMapDestroy() {
    removeOverlay();

    for (BitmapDescriptor bitmap : bitmaps) {
        bitmap.recycle();
    }
    bitmaps = null;
}

MapMarkerAnimationActivity类

  • 以下是MapMarkerAnimationActivity类部分代码

控件响应事件

public void setAnimationFlag(View view) {
    boolean checked = ((RadioButton) view).isChecked();
    int id = view.getId();
    if (!checked)
        return;

    List<String> flags;
    if (id == R.id.frameAnimation) {
        flags = Arrays.asList(
                MapMarkerAnimation.FRAME_ANIMATION,
                MapMarkerAnimation.FRAME_ANIMATION,
                MapMarkerAnimation.FRAME_ANIMATION);
    } else if (id == R.id.loadAnimation) {
        flags = Arrays.asList(
                MapMarkerAnimation.DROP_ANIMATION,
                MapMarkerAnimation.GROW_ANIMATION,
                MapMarkerAnimation.JUMP_ANIMATION);
    } else if (id == R.id.animation) {
        flags = Arrays.asList(
                MapMarkerAnimation.TRANSFORMATION_ANIMATION,
                MapMarkerAnimation.ROTATE_ANIMATION,
                MapMarkerAnimation.ALPHA_ANIMATION,
                MapMarkerAnimation.SCALE_ANIMATION,
                MapMarkerAnimation.SINGLE_SCALE_ANIMATION,
                MapMarkerAnimation.ANIMATION_SET);
    } else {
        return;
    }
    mapMarkerAnimation.setFlags(flags);
}

运行效果图

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2069281.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

二、Java变量

文章目录 一、变量介绍1.1 为什么需要变量1.2 变量的介绍1.4 变量使用注意事项 二、号的使用三、数据类型1.1 整数类型1.2 浮点类型1.3 字符类型(char)1.4 布尔类型&#xff1a;boolean 四、编码五、数据类型转换5.1 自动类型转换5.2 强制类型转换5.3 基本数据类型和String类型…

计算机毕业设计花卉交易管理系统

技术可行性 根据花卉交易管理的基本需求&#xff0c;该系统需要实现把商品的基本信息&#xff0c;销售信息等内容存放到数据库中&#xff0c;是典型的管理信息系统。管理信息系统是建立在现代信息技术基础之上&#xff0c;面向组织的全面管理和简单决策的信息系统[3]。其开发主…

K8S故障

故障显示 解决办法 kubectl -n kube-system edit deployments.apps coredns删除下列数据

探秘沙漠玫瑰:花语蕴含的爱与坚韧及其独特魅力

在广袤无垠的沙漠深处&#xff0c;隐藏着一种神秘而独特的植物——沙漠玫瑰。它宛如大自然遗落在荒漠中的珍宝&#xff0c;绽放着别样的光芒。当人们提及沙漠玫瑰时&#xff0c;首先想到的便是它那饱含深意的花语。那究竟沙漠玫瑰的花语中蕴含着怎样的浪漫与坚韧呢&#xff1f;…

景联文科技高质量文本标注:驱动自然语言处理技术的发展与应用

文本标注是自然语言处理&#xff08;NLP&#xff09;领域的一个重要环节&#xff0c;是指在文本数据上添加额外的信息或标记的过程&#xff0c;目的是为了让计算机能够理解和处理这些文本数据。 通过文本标注&#xff0c;可以为文本中的各个部分提供具体的含义和上下文信息&…

C++相关概念和易错语法(26)(decltype、nullptr、左值和右值、移动构造和移动赋值)

1.decltype “decltype(表达式) 变量名”可以定义变量&#xff0c;这个变量的类型是()括号内表达式的类型&#xff0c;注意这个表达式不会执行&#xff0c;只会推导这个表达式的类型&#xff0c;这点和sizeof一样 2.nullptr 根据#define NULL 0&#xff0c;可知NULL会被预处理…

搭建GAN对抗生成网络进行图像模态转换

生成对抗网络&#xff08;Generative Adversarial Networks, GANs&#xff09;是一种强大的生成模型&#xff0c;它可以通过学习训练数据的分布来生成新的样本。在医学图像处理中&#xff0c;GANs被广泛用于图像模态转换&#xff0c;例如从MRI到CT的转换&#xff0c;这对于临床…

【牛客】两个字符串之间的最短距离

&#x1f397;️ 主页&#xff1a;小夜时雨 &#x1f397;️专栏&#xff1a;算法题 &#x1f397;️如何活着&#xff0c;是我找寻的方向 目录 1. 题目解析2. 代码 1. 题目解析 题目链接: https://www.nowcoder.com/practice/2c6a0a8e1d20492f92941400036e0890 本道题是个模版…

uniapp+vue3的双向渐变

在App.vue中 <style lang"scss">/*每个页面公共css */ import common/style/common-style.scss </style> 在common-style.scss中 //全局双向渐变 .pageColor{background:linear-gradient(to bottom,rgba(0,0,0,0),#fff 400rpx),//到400rpx才做白色渐变…

解锁NGINX---SSL:打造安全、高效的网站加密体验

作者简介&#xff1a;我是团团儿&#xff0c;是一名专注于云计算领域的专业创作者&#xff0c;感谢大家的关注 座右铭&#xff1a; 云端筑梦&#xff0c;数据为翼&#xff0c;探索无限可能&#xff0c;引领云计算新纪元 个人主页&#xff1a;团儿.-CSDN博客 目录 前言&#…

Spring Boot整合Sentry

Spring Boot整合Sentry Sentry搭建Sentry中新建项目集成SpringBoot1. 添加依赖2. 配置Sentry4. 日志集成&#xff08;可选&#xff09;5. 测试Sentry集成6. 配置实时告警配置Alert Settings配置警报规则 发送消息服务代码参照文档 Sentry 是一个日志平台&#xff0c;分为客户端…

WEB服务器的部署及优化

什么是 www&#xff1f; www 是 world wide web 的缩写&#xff0c;及万维网&#xff0c;也就是全球信息广播的意思 通常说的上网就是使用 www 来查询用户所需要的信息。 www 可以结合文字、图形、影像以及声音等多媒体&#xff0c;超链接的方式将信息以 Internet 传递到世界…

记录一下QGIS栅格操作-植被NDVI指数计算

记录一下QGIS栅格操作-植被NDVI指数计算 以计算植被NDVI指数为例&#xff0c;介绍QGIS栅格的相关操作以及应用。 NDVI 数据简介及下载 下载&#xff1a; 地理空间数据云https://www.gscloud.cn/search 选择波段4&#xff08;可见光红色波段&#xff09;和波段5&#xff08;近…

VS2022 - 制作自己的C#类库dll,并输出Unity识别的pdb调试信息文件

然后编写库代码&#xff0c;设置dll生成目录 *** 输出unity可以识别的pdb调试信息文件 *** 右键项目-属性-生成-高级-调试信息&#xff1a;可移植(Portable PDB) 这是因为Unity只能识别MDB和Portable PDB文件 这样设置后&#xff0c;把dll和pdb文件放入到Unity中同文件夹下&…

金融帝国实验室(Capitalism Lab)官方技术支持中文汉化包_v4.09

<FCT汉化小组>Vol.001号作品 ————————————— ◎ 作品名称&#xff1a;金融帝国实验室&#xff08;Capitalism Lab&#xff09;官方中文汉化包 ◎ 制作发布&#xff1a;FCT汉化小组 ◎ 发布版本&#xff1a;CapLab Simplified Chinese loc v4.09 ◎ 发布时…

django学习入门系列之第十点《初识 django》

文章目录 django初识django1 安装django2 创建django项目3 默认项目文件介绍4 APP 往期回顾 django Python知识点:函数、面向对象。前端开发: HTML、CSS、JavaScript、jQuery、BootStrap。MySQL数据库Python的Web框架Flask&#xff0c;自身短小精悍第三方组件。Django&#xf…

Linux驱动开发基础(SR501人体红外模块)

所学来自百问网 目录 1.模块简介 2.原理图及接线 3.设备树修改 4.驱动程序 5.应用程序 6.makefile 7.编译运行 1.模块简介 人体都有恒定的体温&#xff0c;一般在37度&#xff0c;所以会发出特定波长10uM左右的红外线&#xff0c;被动式红外探头就是靠探测人体发射的1…

Kafka·概述

概览 Producer 生产者发送消息给broker&#xff0c;并不是生成一条消息后立刻发送&#xff0c;而是积攒多条后&#xff0c;批量发送到broker。可以通过配置参数batch.size&#xff08;单位字节&#xff09;调整积攒多少后发送 Consumer Topic 消息的分类 当Producer发送指定…

沾包问题,wireshark和netstat的使用

一.沾包 TCP是一个面向字节流的传输层协议。“流” 意味着 TCP 所传输的数据是没有边界的。这不同于 UDP 协议提供的是面向消息的传输服务&#xff0c;其传输的数据是有边界的。TCP 的发送方无法保证对方每次收到的都是一个完整的数据包。于是就有了粘包、拆包问题的出现。粘包…

[数据集][目标检测]电力场景输电线杆塔塔架金属锈蚀腐蚀生锈检测数据集VOC+YOLO格式1344张1类别

数据集格式&#xff1a;Pascal VOC格式YOLO格式(不包含分割路径的txt文件&#xff0c;仅仅包含jpg图片以及对应的VOC格式xml文件和yolo格式txt文件) 图片数量(jpg文件个数)&#xff1a;1344 标注数量(xml文件个数)&#xff1a;1344 标注数量(txt文件个数)&#xff1a;1344 标注…