Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
5021d72f
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
6006
Star
91
Fork
164
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
18
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
18
Issue
18
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
5021d72f
编写于
10月 11, 2024
作者:
taohebin@dcloud.io
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update: map补充示例
# Conflicts: # pages/component/map/map.uvue
上级
e5a3cfbf
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
49 addition
and
43 deletion
+49
-43
pages/component/map/map.uvue
pages/component/map/map.uvue
+49
-43
未找到文件。
pages/component/map/map.uvue
浏览文件 @
5021d72f
...
@@ -15,7 +15,14 @@
...
@@ -15,7 +15,14 @@
<input-data defaultValue="13" title="scale: 缩放级别,取值范围为5-18" type="number"
<input-data defaultValue="13" title="scale: 缩放级别,取值范围为5-18" type="number"
@confirm="confirm_scale_input"></input-data>
@confirm="confirm_scale_input"></input-data>
<boolean-data :defaultValue="showLocation" title="开启显示带有方向的当前定位点" @change="change_show_location"></boolean-data>
<boolean-data :defaultValue="showLocation" title="开启显示带有方向的当前定位点" @change="change_show_location"></boolean-data>
<boolean-data :default-value="enable3D" title="3D效果" @change="change_enable_3d"></boolean-data>
<boolean-data :default-value="showCompass" title="显示指南针" @change="change_show_campass"></boolean-data>
<boolean-data :default-value="enableOverlooking" title="俯视支持" @change="change_enable_overlooking"></boolean-data>
<boolean-data :default-value="enableRotate" title="旋转支持" @change="change_enable_rotate"></boolean-data>
<boolean-data :default-value="enableZoom" title="缩放支持" @change="change_enable_zoom"></boolean-data>
<boolean-data :default-value="enableScroll" title="拖动支持" @change="change_enable_scroll"></boolean-data>
<boolean-data :default-value="enableSatellite" title="卫星图" @change="change_enable_satellite"></boolean-data>
<boolean-data :default-value="enableTraffic" title="实时路况" @change="change_enable_traffic"></boolean-data>
<button class="button" @click="addControls">控件</button>
<button class="button" @click="addControls">控件</button>
<button class="button" @click="addMarkers">添加标记点</button>
<button class="button" @click="addMarkers">添加标记点</button>
...
@@ -365,10 +372,50 @@
...
@@ -365,10 +372,50 @@
}
}
const showLocation = ref(false);
const showLocation = ref(false);
const enable3D = ref(false);
const showCompass = ref(false);
const enableOverlooking = ref(false);
const enableRotate = ref(false);
const enableZoom = ref(true);
const enableScroll = ref(true);
const enableSatellite = ref(false);
const enableTraffic = ref(false);
const change_show_location = (checked : boolean) => {
const change_show_location = (checked : boolean) => {
showLocation.value = checked
showLocation.value = checked
}
}
const change_enable_3d = (checked : boolean) => {
enable3D.value = checked
}
const change_show_campass = (checked : boolean) => {
showCompass.value = checked
}
const change_enable_overlooking = (checked : boolean) => {
enableOverlooking.value = checked
}
const change_enable_rotate = (checked : boolean) => {
enableRotate.value = checked
}
const change_enable_zoom = (checked : boolean) => {
enableZoom.value = checked
}
const change_enable_scroll = (checked : boolean) => {
enableScroll.value = checked
}
const change_enable_satellite = (checked : boolean) => {
enableSatellite.value = checked
}
const change_enable_traffic = (checked : boolean) => {
enableTraffic.value = checked
}
const includePoints = ref([] as LocationObject[]);
const includePoints = ref([] as LocationObject[]);
const includePoint = () => {
const includePoint = () => {
includePoints.value = testIncludePoints;
includePoints.value = testIncludePoints;
...
@@ -457,47 +504,6 @@
...
@@ -457,47 +504,6 @@
}
}
};
};
const showCompass = ref(true);
const enable3D = ref(true);
const enableOverlooking = ref(true);
const enableZoom = ref(true);
const enableScroll = ref(true);
const enableRotate = ref(true);
const enableSatellite = ref(false);
const enableTraffic = ref(false);
const enableThreeD = (e) => {
enable3D.value = e.detail.value;
}
const changeShowCompass = (e) => {
showCompass.value = e.detail.value;
}
const changeEnableOverlooking = (e) => {
enableOverlooking.value = e.detail.value;
};
const changeEnableZoom = (e) => {
enableZoom.value = e.detail.value;
};
const changeEnableScroll = (e) => {
enableScroll.value = e.detail.value;
};
const changeEnableRotate = (e) => {
enableRotate.value = e.detail.value;
};
const changeEnableSatellite = (e) => {
enableSatellite.value = e.detail.value;
};
const changeEnableTraffic = (e) => {
enableTraffic.value = e.detail.value;
};
const handleGetCenterLocation = () => {
const handleGetCenterLocation = () => {
mapContext.value?.getCenterLocation({
mapContext.value?.getCenterLocation({
success: ret => {
success: ret => {
...
@@ -612,7 +618,7 @@
...
@@ -612,7 +618,7 @@
});
});
};
};
const maptap = (e : UniMap
Updated
Event) => {
const maptap = (e : UniMap
Tap
Event) => {
// console.log('点击地图时触发',e)
// console.log('点击地图时触发',e)
uni.showModal({
uni.showModal({
content: JSON.stringify(e)
content: JSON.stringify(e)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录