HarmonyOS Flutter uniapp的前端相关问题

1、uniapp的前端开发环境搭建有哪些具体细节?

2、uniapp适配以后,地图上的定位和轨迹怎么实现?

3、开发完成后,测试除了真机外,还有哪些工具可以使用?

4、开发完成后,在HarmonyOS NEXT上架,需要提前准备哪些材料?

HarmonyOS
2024-12-28 08:44:43
浏览
收藏 0
回答 1
回答 1
按赞同
/
按时间
put_get

开发完成后处理真机测试外,还可以选择如下几个方式测试:

1.DevEco Testing工具测试:https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/devecotesting-V5

2.邀请测试和公开测试:https://developer.huawei.com/consumer/cn/doc/app/agc-help-harmonyos-testapp-0000001873653977

3.开放式测试:https://developer.huawei.com/consumer/cn/doc/AppGallery-connect-Guides/agc-betatest-introduction-0000001071477284

应用上架具体流程可参考官方文档:https://developer.huawei.com/consumer/cn/doc/app/agc-help-harmonyos-releaseapp-0000001126380068

地图标记的案例代码:

import { AsyncCallback } from '@kit.BasicServicesKit';
@Entry
@Component
struct MarkerDemo {
  private mapOptions?: mapCommon.MapOptions;
  private mapController?: map.MapComponentController;
  private callback?: AsyncCallback<map.MapComponentController>
  private marker?: map.Marker;
  aboutToAppear(): void {
    // 地图初始化参数
    this.mapOptions = {
      position: {
        target: {
          latitude:31.984410259206815,
          longitude: 118.76625379397866
        },
        zoom: 15
      }
    };
    this.callback = async (err, mapController) => {
      if(!err) {
        this.mapController = mapController;
        //Marker初始化参数
        let markerOptions: mapCommon.MarkerOptions = {
          position: {
            latitude: 31.984410259206815,
            longitude: 118.76625379397866
          },
          // 图标存放在resources/rawfile,icon参数传入rawfile文件夹下的相对路径
        };
        //创建Marker
        this.marker = await this.mapController.addMarker(markerOptions);
        //设置信息窗的标题
        this.marker.setTitle('南京');
        // 设置信息窗的子标题
        this.marker.setSnippet('华东地区')
        // 设置信息窗的锚点位置
        this.marker.setInfoWindowAnchor(1,1)
        // 设置信息窗可见
        this.marker.setInfoWindowVisible(true)
        //设置标记可拖拽
        this.marker.setDraggable(true)
        //设置标记锚点
        this.mapController.on("markerDragStart", (marker) => {
          console.info(`on-markerDragStart position = ${JSON.stringify(marker)}`);
        })
        // 监听标记拖拽事件
        this.mapController.on("markerDrag", (marker) => {
          console.info(`on-markerDrag position = ${JSON.stringify(marker)}`)
        })
        //设置监听标记拖动事件
        this.mapController.on("markerClick", (marker) => {
          console.info(`on-markerClick position = ${JSON.stringify(marker)}`)
        })
        // 构造RotateAnimation对象
        let animation = new map.RotateAnimation(0,360);
        // 动画执行时间
        animation.setDuration(2000);
        //动画结束状态
        animation.setFillMode(map.AnimationFillMode.BACKWARDS)
        // 动画重复模式
        animation.setRepeatMode(map.AnimationRepeatMode.REVERSE)
        // 动画重复次数
        animation.setRepeatCount(1)
        // 根据开发需要设置动画监听
        animation.on("start", () => {
          console.info('start RotateAnimation')
        })
        animation.on("end", () => {
          console.info('end RotateAnimation');
        })
        // 设置动画
        this.marker.setAnimation(animation);
        // 开启动画
        this.marker.startAnimation();
      }
    }
  }
  build() {
    Stack() {
      Column() {
        MapComponent({ mapOptions: this.mapOptions, mapCallback: this.callback});
      }.width('100%')
    }.height('100%')
  }
}
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 84.
  • 85.
  • 86.
分享
微博
QQ
微信
回复
2024-12-28 10:54:00
相关问题
鸿蒙OS 智能手表端相关问题
4716浏览 • 1回复 待解决
HarmonyOS Flutter项目开发相关问题
848浏览 • 1回复 待解决
Flutter 开发资料相关问题
1316浏览 • 1回复 待解决
HarmonyOS flutter相关资料
824浏览 • 1回复 待解决
flutter相关资料地址
1054浏览 • 1回复 待解决
HarmonyOS flutter问题
734浏览 • 1回复 待解决
uniapp开发HarmonyOS
693浏览 • 1回复 待解决
HarmonyOS flutter_flutter开发环境搭建问题
1060浏览 • 1回复 待解决
HarmonyOS Flutter插件问题
941浏览 • 1回复 待解决
HarmonyOS引用flutter问题
906浏览 • 1回复 待解决
flutter混合遇到问题
1328浏览 • 1回复 待解决
HarmonyOS 弹窗相关问题
1115浏览 • 1回复 待解决
HarmonyOS flutter_inappwebview问题
765浏览 • 1回复 待解决
HarmonyOS webview_flutter问题
826浏览 • 1回复 待解决
HarmonyOS Flutter版本适配问题
1067浏览 • 1回复 待解决
HarmonyOS flutter崩溃问题处理
1058浏览 • 1回复 待解决
HarmonyOS @Entry组件相关问题
771浏览 • 1回复 待解决
HarmonyOS flutter_location新增参数问题
519浏览 • 1回复 待解决
HarmonyOS uniapp数据缓存无效
716浏览 • 1回复 待解决