Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lzb_79
uni-app
提交
453b3fe2
U
uni-app
项目概览
lzb_79
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
453b3fe2
编写于
9月 16, 2021
作者:
Q
qiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(h5): openLocation use google map
上级
1b0dffd7
变更
11
展开全部
隐藏空白更改
内联
并排
Showing
11 changed file
with
429 addition
and
222 deletion
+429
-222
packages/uni-h5/dist/uni-h5.cjs.js
packages/uni-h5/dist/uni-h5.cjs.js
+5
-4
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+152
-105
packages/uni-h5/src/helpers/location.ts
packages/uni-h5/src/helpers/location.ts
+34
-0
packages/uni-h5/src/service/api/location/chooseLocation/LoctaionPicker.tsx
...rc/service/api/location/chooseLocation/LoctaionPicker.tsx
+14
-11
packages/uni-h5/src/service/api/location/getLocation.ts
packages/uni-h5/src/service/api/location/getLocation.ts
+8
-19
packages/uni-h5/src/service/api/location/openLocation/LocationView.tsx
...h5/src/service/api/location/openLocation/LocationView.tsx
+124
-50
packages/uni-h5/src/view/components/map/MapLocation.tsx
packages/uni-h5/src/view/components/map/MapLocation.tsx
+2
-4
packages/uni-h5/src/view/components/map/index.tsx
packages/uni-h5/src/view/components/map/index.tsx
+3
-7
packages/uni-h5/src/view/components/map/maps/index.ts
packages/uni-h5/src/view/components/map/maps/index.ts
+14
-21
packages/uni-h5/style/api/location-picker.css
packages/uni-h5/style/api/location-picker.css
+0
-1
packages/uni-h5/style/api/location-view.css
packages/uni-h5/style/api/location-view.css
+73
-0
未找到文件。
packages/uni-h5/dist/uni-h5.cjs.js
浏览文件 @
453b3fe2
...
@@ -7652,10 +7652,12 @@ var index$d = /* @__PURE__ */ defineBuiltInComponent({
...
@@ -7652,10 +7652,12 @@ var index$d = /* @__PURE__ */ defineBuiltInComponent({
};
};
}
}
});
});
const
ICON_PATH_ORIGIN
=
"
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAACECAMAAABmmnOVAAAC01BMVEUAAAAAef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef96quGStdqStdpbnujMzMzCyM7Gyc7Ky83MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMwAef8GfP0yjfNWnOp0qOKKsdyYt9mju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
=
"
google
"
;
MapType2
[
"
UNKNOWN
"
]
=
""
;
})(
MapType
||
(
MapType
=
{}));
})(
MapType
||
(
MapType
=
{}));
const
props$6
=
{
const
props$6
=
{
id
:
{
id
:
{
...
@@ -8196,7 +8198,6 @@ var MapControl = /* @__PURE__ */ defineSystemComponent({
...
@@ -8196,7 +8198,6 @@ var MapControl = /* @__PURE__ */ defineSystemComponent({
}
}
});
});
const
CONTEXT_ID
=
"
MAP_LOCATION
"
;
const
CONTEXT_ID
=
"
MAP_LOCATION
"
;
const
ICON_PATH
=
"
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAACECAMAAABmmnOVAAAC01BMVEUAAAAAef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef96quGStdqStdpbnujMzMzCyM7Gyc7Ky83MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMwAef8GfP0yjfNWnOp0qOKKsdyYt9mju9aZt9mMstx1qeJYnekyjvIIfP0qivVmouaWttnMzMyat9lppOUujPQKffxhoOfNzc3Y2Njh4eHp6enu7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pHgaddBZ+wBuSFcwJqSN2ovmZ/dfnOvCTxqGtwzq8SEjv4EhISn48eWgnhUP7DvDSvgzxrs6vV6+FLiro2EkCic4QKkzwJsH1KYreCp0eQhfyDl1B/w4P/xa5JVJ4U03QjbRD9x7wXlgH5IE3wmMBHXoSlugFAcI6f/AkkSi8q6HQm6xDn77wEQ8djTwSj3tqAMguRTe4ikeOQyJ4YV+KfkQl+oNW5GbY4gWOWgbwJ+kwAD6Fi90MK2ZsrIeBBCUGwRXbqJ+/iJMQliIEBhOU6AJhtlG/IpHE2bqrYQg5h6HA4yQiRqwEfkGCdTCMmMRw+IbPDCQaHCsCYAQxiZHw3TbmD/ESOHgHwShiEqPhp/gggYkSztIxxCRawy/bmEniJaJtfwiEscQkxkFgRqJESqQwwHhiEuMBp3Vm8RK/cZoHEzKXhCK2QxEPpiJe0YlKCFaKCNv/cYBNUsBRPlkJSc0U+dM7E9H0ThGJbgZT/iR7yj+VqMS06Qr4+OFm2JdCxIa8lugzkJs5K6MfxAaYPUcBpYG5khZJEkUUSb7DPCnKRfPBXj6M8FwuegoLpCgXcQszVjhbJFUJUee2hBhLoYTIcYtB57KY+opSMdVqwatSlZVj05aV//CwJLMX2DluaUcwhXm4ali2XOoLjxUrPV26zFtF4f5p0Gp310+z13BUWNvbehEXona6iAtX/zVZmtfN4WixfsNky4S6gCCVVq3RPLdfSfpv3MRRZfPoLc6Xs/5bt3EyMGzE9h07/Xft2t15z6i9+zgGg8FgMBgMBoPBYDAYDAYj8/APG67Rie8pUDsAAAAASUVORK5CYII=
"
;
var
MapLocation
=
/* @__PURE__ */
defineSystemComponent
({
var
MapLocation
=
/* @__PURE__ */
defineSystemComponent
({
name
:
"
MapLocation
"
,
name
:
"
MapLocation
"
,
setup
()
{
setup
()
{
...
@@ -8213,7 +8214,7 @@ var MapLocation = /* @__PURE__ */ defineSystemComponent({
...
@@ -8213,7 +8214,7 @@ var MapLocation = /* @__PURE__ */ defineSystemComponent({
},
},
"
width
"
:
"
44
"
,
"
width
"
:
"
44
"
,
"
height
"
:
"
44
"
,
"
height
"
:
"
44
"
,
"
iconPath
"
:
ICON_PATH
"
iconPath
"
:
ICON_PATH
_ORIGIN
},
state
),
null
,
16
,
[
"
iconPath
"
])
:
null
;
},
state
),
null
,
16
,
[
"
iconPath
"
])
:
null
;
};
};
}
}
...
@@ -8225,11 +8226,11 @@ const props$2 = {
...
@@ -8225,11 +8226,11 @@ const props$2 = {
},
},
latitude
:
{
latitude
:
{
type
:
[
String
,
Number
],
type
:
[
String
,
Number
],
default
:
39.90374
default
:
0
},
},
longitude
:
{
longitude
:
{
type
:
[
String
,
Number
],
type
:
[
String
,
Number
],
default
:
116.397827
default
:
0
},
},
scale
:
{
scale
:
{
type
:
[
String
,
Number
],
type
:
[
String
,
Number
],
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
453b3fe2
此差异已折叠。
点击以展开。
packages/uni-h5/src/helpers/location.ts
0 → 100644
浏览文件 @
453b3fe2
export
interface
Point
{
latitude
:
number
longitude
:
number
}
export
const
ICON_PATH_LOCTAION
=
'
M13.3334375 16 q0.033125 1.1334375 0.783125 1.8834375 q0.75 0.75 1.8834375 0.75 q1.1334375 0 1.8834375 -0.75 q0.75 -0.75 0.75 -1.8834375 q0 -1.1334375 -0.75 -1.8834375 q-0.75 -0.75 -1.8834375 -0.75 q-1.1334375 0 -1.8834375 0.75 q-0.75 0.75 -0.783125 1.8834375 ZM30.9334375 14.9334375 l-1.1334375 0 q-0.5 -5.2 -4.0165625 -8.716875 q-3.516875 -3.5165625 -8.716875 -4.0165625 l0 -1.1334375 q0 -0.4665625 -0.3 -0.7665625 q-0.3 -0.3 -0.7665625 -0.3 q-0.4665625 0 -0.7665625 0.3 q-0.3 0.3 -0.3 0.7665625 l0 1.1334375 q-5.2 0.5 -8.716875 4.0165625 q-3.5165625 3.516875 -4.0165625 8.716875 l-1.1334375 0 q-0.4665625 0 -0.7665625 0.3 q-0.3 0.3 -0.3 0.7665625 q0 0.4665625 0.3 0.7665625 q0.3 0.3 0.7665625 0.3 l1.1334375 0 q0.5 5.2 4.0165625 8.716875 q3.516875 3.5165625 8.716875 4.0165625 l0 1.1334375 q0 0.4665625 0.3 0.7665625 q0.3 0.3 0.7665625 0.3 q0.4665625 0 0.7665625 -0.3 q0.3 -0.3 0.3 -0.7665625 l0 -1.1334375 q5.2 -0.5 8.716875 -4.0165625 q3.5165625 -3.516875 4.0165625 -8.716875 l1.1334375 0 q0.4665625 0 0.7665625 -0.3 q0.3 -0.3 0.3 -0.7665625 q0 -0.4665625 -0.3 -0.7665625 q-0.3 -0.3 -0.7665625 -0.3 ZM17.0665625 27.6665625 l0 -2.0665625 q0 -0.4665625 -0.3 -0.7665625 q-0.3 -0.3 -0.7665625 -0.3 q-0.4665625 0 -0.7665625 0.3 q-0.3 0.3 -0.3 0.7665625 l0 2.0665625 q-4.3 -0.4665625 -7.216875 -3.383125 q-2.916875 -2.916875 -3.3834375 -7.216875 l2.0665625 0 q0.4665625 0 0.7665625 -0.3 q0.3 -0.3 0.3 -0.7665625 q0 -0.4665625 -0.3 -0.7665625 q-0.3 -0.3 -0.7665625 -0.3 l-2.0665625 0 q0.4665625 -4.3 3.3834375 -7.216875 q2.9165625 -2.916875 7.216875 -3.3834375 l0 2.0665625 q0 0.4665625 0.3 0.7665625 q0.3 0.3 0.7665625 0.3 q0.4665625 0 0.7665625 -0.3 q0.3 -0.3 0.3 -0.7665625 l0 -2.0665625 q4.3 0.4665625 7.216875 3.3834375 q2.9165625 2.9165625 3.383125 7.216875 l-2.0665625 0 q-0.4665625 0 -0.7665625 0.3 q-0.3 0.3 -0.3 0.7665625 q0 0.4665625 0.3 0.7665625 q0.3 0.3 0.7665625 0.3 l2.0665625 0 q-0.4665625 4.3 -3.383125 7.216875 q-2.916875 2.9165625 -7.216875 3.383125 Z
'
export
const
ICON_PATH_ORIGIN
=
'
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAACECAMAAABmmnOVAAAC01BMVEU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lkPsP4VWf+Rrd+m1v9o9h8Vv5p42C1R5qL1x7WRglOgVN52yfwNOBu76P+lLPoYidu23KPciIHGa07ZeIW1jvcNtI7q5vexCPGYCmf+m/Y9a3sAwQ5bI9T7ukPgPcn9GToEao+xk1OixJT+GIsvNAbx6eAgPq0xiF+KtkpYKhRXCQ8eFFcJhSWGu3rZ8jJkCM8kz9K4TUnrC6mAgzTsB9tLwQ2W15qfosQ2GrQNpZr7aczbzVjBZsvLcaC1g0bsbIVEnU8DOr6H1KDH2LwtUBi0/JII6Dxm9zUXkH+XMWzfh1Dte1i2Pe3QkC77Zel7aehpO8wyHG6Dtt0NjKxhN6I4uSli/TqJiJJDUQ4NDCURXTrXRy1XcumyD24M+AzhD1RXIIZsl/LoyZmurJHDM7s8lvB2FQ/PmPJ6PseAXP5HGMYAAC7ABbgAF+ACXIALcAEuwAW4ABfgAlyAC3ABLsAFuID/d8Cx4NEt8/byOf0wLnis8zjMq9/Kp7bWw4JOj8u8TlhRl+G/Mp2wpOX48GffvvZ1CyL4B53LAS6zb08EAAAAAElFTkSuQmCC
'
export
enum
MapType
{
QQ
=
'
qq
'
,
GOOGLE
=
'
google
'
,
UNKNOWN
=
''
,
}
export
function
getMapInfo
()
{
let
type
:
MapType
=
MapType
.
UNKNOWN
let
key
:
string
=
''
if
(
__uniConfig
.
qqMapKey
)
{
type
=
MapType
.
QQ
key
=
__uniConfig
.
qqMapKey
}
else
if
(
__uniConfig
.
googleMapKey
)
{
type
=
MapType
.
GOOGLE
key
=
__uniConfig
.
googleMapKey
}
return
{
type
,
key
,
}
}
packages/uni-h5/src/service/api/location/chooseLocation/LoctaionPicker.tsx
浏览文件 @
453b3fe2
...
@@ -12,11 +12,14 @@ import {
...
@@ -12,11 +12,14 @@ import {
ScrollView
,
ScrollView
,
}
from
'
@dcloudio/uni-components
'
}
from
'
@dcloudio/uni-components
'
import
{
usePreventScroll
}
from
'
../../../../helpers/usePreventScroll
'
import
{
usePreventScroll
}
from
'
../../../../helpers/usePreventScroll
'
import
{
Point
,
ICON_PATH_LOCTAION
,
ICON_PATH_TARGET
,
}
from
'
../../../../helpers/location
'
import
{
Map
}
from
'
../../../../view/components
'
import
{
Map
}
from
'
../../../../view/components
'
import
{
getJSONP
}
from
'
../../../../helpers/getJSONP
'
import
{
getJSONP
}
from
'
../../../../helpers/getJSONP
'
import
{
getLocation
}
from
'
../../location/getLocation
'
import
{
getLocation
}
from
'
../../location/getLocation
'
const
ICON_PATH_LOCTAION
=
'
M13.3334375 16 q0.033125 1.1334375 0.783125 1.8834375 q0.75 0.75 1.8834375 0.75 q1.1334375 0 1.8834375 -0.75 q0.75 -0.75 0.75 -1.8834375 q0 -1.1334375 -0.75 -1.8834375 q-0.75 -0.75 -1.8834375 -0.75 q-1.1334375 0 -1.8834375 0.75 q-0.75 0.75 -0.783125 1.8834375 ZM30.9334375 14.9334375 l-1.1334375 0 q-0.5 -5.2 -4.0165625 -8.716875 q-3.516875 -3.5165625 -8.716875 -4.0165625 l0 -1.1334375 q0 -0.4665625 -0.3 -0.7665625 q-0.3 -0.3 -0.7665625 -0.3 q-0.4665625 0 -0.7665625 0.3 q-0.3 0.3 -0.3 0.7665625 l0 1.1334375 q-5.2 0.5 -8.716875 4.0165625 q-3.5165625 3.516875 -4.0165625 8.716875 l-1.1334375 0 q-0.4665625 0 -0.7665625 0.3 q-0.3 0.3 -0.3 0.7665625 q0 0.4665625 0.3 0.7665625 q0.3 0.3 0.7665625 0.3 l1.1334375 0 q0.5 5.2 4.0165625 8.716875 q3.516875 3.5165625 8.716875 4.0165625 l0 1.1334375 q0 0.4665625 0.3 0.7665625 q0.3 0.3 0.7665625 0.3 q0.4665625 0 0.7665625 -0.3 q0.3 -0.3 0.3 -0.7665625 l0 -1.1334375 q5.2 -0.5 8.716875 -4.0165625 q3.5165625 -3.516875 4.0165625 -8.716875 l1.1334375 0 q0.4665625 0 0.7665625 -0.3 q0.3 -0.3 0.3 -0.7665625 q0 -0.4665625 -0.3 -0.7665625 q-0.3 -0.3 -0.7665625 -0.3 ZM17.0665625 27.6665625 l0 -2.0665625 q0 -0.4665625 -0.3 -0.7665625 q-0.3 -0.3 -0.7665625 -0.3 q-0.4665625 0 -0.7665625 0.3 q-0.3 0.3 -0.3 0.7665625 l0 2.0665625 q-4.3 -0.4665625 -7.216875 -3.383125 q-2.916875 -2.916875 -3.3834375 -7.216875 l2.0665625 0 q0.4665625 0 0.7665625 -0.3 q0.3 -0.3 0.3 -0.7665625 q0 -0.4665625 -0.3 -0.7665625 q-0.3 -0.3 -0.7665625 -0.3 l-2.0665625 0 q0.4665625 -4.3 3.3834375 -7.216875 q2.9165625 -2.916875 7.216875 -3.3834375 l0 2.0665625 q0 0.4665625 0.3 0.7665625 q0.3 0.3 0.7665625 0.3 q0.4665625 0 0.7665625 -0.3 q0.3 -0.3 0.3 -0.7665625 l0 -2.0665625 q4.3 0.4665625 7.216875 3.3834375 q2.9165625 2.9165625 3.383125 7.216875 l-2.0665625 0 q-0.4665625 0 -0.7665625 0.3 q-0.3 0.3 -0.3 0.7665625 q0 0.4665625 0.3 0.7665625 q0.3 0.3 0.7665625 0.3 l2.0665625 0 q-0.4665625 4.3 -3.383125 7.216875 q-2.916875 2.9165625 -7.216875 3.383125 Z
'
const
props
=
{
const
props
=
{
latitude
:
{
latitude
:
{
...
@@ -40,10 +43,7 @@ function distance(distance: number): string {
...
@@ -40,10 +43,7 @@ function distance(distance: number): string {
return
''
return
''
}
}
}
}
interface
Point
{
latitude
:
number
longitude
:
number
}
interface
State
{
interface
State
{
latitude
:
number
latitude
:
number
longitude
:
number
longitude
:
number
...
@@ -205,10 +205,10 @@ export default /*#__PURE__*/ defineSystemComponent({
...
@@ -205,10 +205,10 @@ export default /*#__PURE__*/ defineSystemComponent({
type
:
'
gcj02
'
,
type
:
'
gcj02
'
,
success
:
move
,
success
:
move
,
fail
:
()
=>
{
fail
:
()
=>
{
move
({
//
move({
latitude
:
39.90960456049752
,
// latitude: 0
,
longitude
:
116.3972282409668
,
// longitude: 0
,
})
//
})
},
},
})
})
}
}
...
@@ -267,7 +267,10 @@ export default /*#__PURE__*/ defineSystemComponent({
...
@@ -267,7 +267,10 @@ export default /*#__PURE__*/ defineSystemComponent({
// @ts-ignore
// @ts-ignore
onRegionchange
=
{
onRegionChange
}
onRegionchange
=
{
onRegionChange
}
>
>
<
div
class
=
"map-location"
/>
<
div
class
=
"map-location"
style
=
{
`background-image: url("
${
ICON_PATH_TARGET
}
")`
}
/>
<
div
class
=
"map-move"
onClick
=
{
moveToLocation
}
>
<
div
class
=
"map-move"
onClick
=
{
moveToLocation
}
>
{
createSvgIconVNode
(
ICON_PATH_LOCTAION
,
'
#000000
'
,
24
)
}
{
createSvgIconVNode
(
ICON_PATH_LOCTAION
,
'
#000000
'
,
24
)
}
</
div
>
</
div
>
...
...
packages/uni-h5/src/service/api/location/getLocation.ts
浏览文件 @
453b3fe2
...
@@ -6,6 +6,7 @@ import {
...
@@ -6,6 +6,7 @@ import {
GetLocationProtocol
,
GetLocationProtocol
,
GetLocationOptions
,
GetLocationOptions
,
}
from
'
@dcloudio/uni-api
'
}
from
'
@dcloudio/uni-api
'
import
{
MapType
,
getMapInfo
}
from
'
../../../helpers/location
'
import
{
getJSONP
}
from
'
../../../helpers/getJSONP
'
import
{
getJSONP
}
from
'
../../../helpers/getJSONP
'
import
{
request
}
from
'
../network/request
'
import
{
request
}
from
'
../network/request
'
...
@@ -14,19 +15,7 @@ type GeoRes = (coords: GeolocationCoordinates, skip?: boolean) => void
...
@@ -14,19 +15,7 @@ type GeoRes = (coords: GeolocationCoordinates, skip?: boolean) => void
export
const
getLocation
=
<
API_TYPE_GET_LOCATION
>
defineAsyncApi
(
export
const
getLocation
=
<
API_TYPE_GET_LOCATION
>
defineAsyncApi
(
API_GET_LOCATION
,
API_GET_LOCATION
,
({
type
,
altitude
},
{
resolve
,
reject
})
=>
{
({
type
,
altitude
},
{
resolve
,
reject
})
=>
{
enum
MapType
{
const
mapInfo
=
getMapInfo
()
QQ
=
'
qq
'
,
GOOGLE
=
'
google
'
,
}
let
mapType
:
string
let
mapKey
:
string
if
(
__uniConfig
.
qqMapKey
)
{
mapType
=
MapType
.
QQ
mapKey
=
__uniConfig
.
qqMapKey
}
else
if
(
__uniConfig
.
googleMapKey
)
{
mapType
=
MapType
.
GOOGLE
mapKey
=
__uniConfig
.
googleMapKey
}
new
Promise
((
resolve
:
GeoRes
,
reject
)
=>
{
new
Promise
((
resolve
:
GeoRes
,
reject
)
=>
{
if
(
navigator
.
geolocation
)
{
if
(
navigator
.
geolocation
)
{
...
@@ -44,9 +33,9 @@ export const getLocation = <API_TYPE_GET_LOCATION>defineAsyncApi(
...
@@ -44,9 +33,9 @@ export const getLocation = <API_TYPE_GET_LOCATION>defineAsyncApi(
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
return
new
Promise
((
resolve
:
GeoRes
,
reject
)
=>
{
return
new
Promise
((
resolve
:
GeoRes
,
reject
)
=>
{
if
(
map
T
ype
===
MapType
.
QQ
)
{
if
(
map
Info
.
t
ype
===
MapType
.
QQ
)
{
getJSONP
(
getJSONP
(
`https://apis.map.qq.com/ws/location/v1/ip?output=jsonp&key=
${
map
K
ey
}
`
,
`https://apis.map.qq.com/ws/location/v1/ip?output=jsonp&key=
${
map
Info
.
k
ey
}
`
,
{
{
callback
:
'
callback
'
,
callback
:
'
callback
'
,
},
},
...
@@ -66,10 +55,10 @@ export const getLocation = <API_TYPE_GET_LOCATION>defineAsyncApi(
...
@@ -66,10 +55,10 @@ export const getLocation = <API_TYPE_GET_LOCATION>defineAsyncApi(
},
},
()
=>
reject
(
new
Error
(
'
network error
'
))
()
=>
reject
(
new
Error
(
'
network error
'
))
)
)
}
else
if
(
map
T
ype
===
MapType
.
GOOGLE
)
{
}
else
if
(
map
Info
.
t
ype
===
MapType
.
GOOGLE
)
{
request
({
request
({
method
:
'
POST
'
,
method
:
'
POST
'
,
url
:
`https://www.googleapis.com/geolocation/v1/geolocate?key=
${
map
K
ey
}
`
,
url
:
`https://www.googleapis.com/geolocation/v1/geolocate?key=
${
map
Info
.
k
ey
}
`
,
success
(
res
)
{
success
(
res
)
{
const
data
:
AnyObject
=
res
.
data
as
AnyObject
const
data
:
AnyObject
=
res
.
data
as
AnyObject
if
(
'
location
'
in
data
)
{
if
(
'
location
'
in
data
)
{
...
@@ -98,14 +87,14 @@ export const getLocation = <API_TYPE_GET_LOCATION>defineAsyncApi(
...
@@ -98,14 +87,14 @@ export const getLocation = <API_TYPE_GET_LOCATION>defineAsyncApi(
.
then
((
coords
:
GeolocationCoordinates
,
skip
?:
boolean
)
=>
{
.
then
((
coords
:
GeolocationCoordinates
,
skip
?:
boolean
)
=>
{
if
(
if
(
(
type
&&
type
.
toUpperCase
()
===
'
WGS84
'
)
||
(
type
&&
type
.
toUpperCase
()
===
'
WGS84
'
)
||
map
T
ype
!==
MapType
.
QQ
||
map
Info
.
t
ype
!==
MapType
.
QQ
||
skip
skip
)
{
)
{
return
coords
return
coords
}
}
return
new
Promise
((
resolve
:
GeoRes
)
=>
{
return
new
Promise
((
resolve
:
GeoRes
)
=>
{
getJSONP
(
getJSONP
(
`https://apis.map.qq.com/jsapi?qt=translate&type=1&points=
${
coords
.
longitude
}
,
${
coords
.
latitude
}
&key=
${
map
K
ey
}
&output=jsonp&pf=jsapi&ref=jsapi`
,
`https://apis.map.qq.com/jsapi?qt=translate&type=1&points=
${
coords
.
longitude
}
,
${
coords
.
latitude
}
&key=
${
map
Info
.
k
ey
}
&output=jsonp&pf=jsapi&ref=jsapi`
,
{
{
callback
:
'
cb
'
,
callback
:
'
cb
'
,
},
},
...
...
packages/uni-h5/src/service/api/location/openLocation/LocationView.tsx
浏览文件 @
453b3fe2
import
{
Ref
,
ref
,
ExtractPropTypes
,
reactive
,
computed
}
from
'
vue
'
import
{
ExtractPropTypes
,
reactive
,
watch
}
from
'
vue
'
import
{
createSvgIconVNode
,
ICON_PATH_BACK
}
from
'
@dcloudio/uni-core
'
import
{
createSvgIconVNode
,
ICON_PATH_BACK
}
from
'
@dcloudio/uni-core
'
import
{
defineSystemComponent
}
from
'
@dcloudio/uni-components
'
import
{
defineSystemComponent
}
from
'
@dcloudio/uni-components
'
import
{
usePreventScroll
}
from
'
../../../../helpers/usePreventScroll
'
import
{
usePreventScroll
}
from
'
../../../../helpers/usePreventScroll
'
import
{
Point
,
ICON_PATH_LOCTAION
,
ICON_PATH_ORIGIN
,
ICON_PATH_TARGET
,
MapType
,
getMapInfo
,
}
from
'
../../../../helpers/location
'
import
{
Map
}
from
'
../../../../view/components
'
import
{
getLocation
}
from
'
../../location/getLocation
'
const
ICON_PATH_NAV
=
'
M28 17c-6.49396875 0-12.13721875 2.57040625-15 6.34840625V5.4105l6.29859375 6.29859375c0.387875 0.387875 1.02259375 0.387875 1.4105 0 0.387875-0.387875 0.387875-1.02259375 0-1.4105L12.77853125 2.36803125a0.9978125 0.9978125 0 0 0-0.0694375-0.077125c-0.1944375-0.1944375-0.45090625-0.291375-0.70721875-0.290875l-0.00184375-0.0000625-0.00184375 0.0000625c-0.2563125-0.0005-0.51278125 0.09640625-0.70721875 0.290875a0.9978125 0.9978125 0 0 0-0.0694375 0.077125l-7.930625 7.9305625c-0.387875 0.387875-0.387875 1.02259375 0 1.4105 0.387875 0.387875 1.02259375 0.387875 1.4105 0L11 5.4105V29c0 0.55 0.45 1 1 1s1-0.45 1-1c0-5.52284375 6.71571875-10 15-10 0.55228125 0 1-0.44771875 1-1 0-0.55228125-0.44771875-1-1-1z
'
const
props
=
{
const
props
=
{
latitude
:
{
latitude
:
{
...
@@ -26,75 +39,136 @@ const props = {
...
@@ -26,75 +39,136 @@ const props = {
export
type
Props
=
ExtractPropTypes
<
typeof
props
>
export
type
Props
=
ExtractPropTypes
<
typeof
props
>
interface
State
{
center
:
Point
marker
:
Point
location
:
Point
}
function
useState
(
props
:
Props
)
{
const
state
:
State
=
reactive
({
center
:
{
latitude
:
0
,
longitude
:
0
,
},
marker
:
{
id
:
1
,
latitude
:
0
,
longitude
:
0
,
iconPath
:
ICON_PATH_TARGET
,
width
:
32
,
height
:
52
,
},
location
:
{
id
:
2
,
latitude
:
0
,
longitude
:
0
,
iconPath
:
ICON_PATH_ORIGIN
,
width
:
44
,
height
:
44
,
},
})
function
updatePosition
()
{
if
(
props
.
latitude
&&
props
.
longitude
)
{
state
.
center
.
latitude
=
props
.
latitude
state
.
center
.
longitude
=
props
.
longitude
state
.
marker
.
latitude
=
props
.
latitude
state
.
marker
.
longitude
=
props
.
longitude
}
}
watch
([()
=>
props
.
latitude
,
()
=>
props
.
longitude
],
updatePosition
)
updatePosition
()
return
state
}
export
default
/*#__PURE__*/
defineSystemComponent
({
export
default
/*#__PURE__*/
defineSystemComponent
({
name
:
'
LocationView
'
,
name
:
'
LocationView
'
,
props
,
props
,
emits
:
[
'
close
'
],
emits
:
[
'
close
'
],
setup
(
props
,
{
emit
})
{
setup
(
props
,
{
emit
})
{
const
state
=
useState
(
props
)
usePreventScroll
()
usePreventScroll
()
const
mapRef
:
Ref
<
HTMLIFrameElement
|
null
>
=
ref
(
null
)
const
key
=
__uniConfig
.
qqMapKey
const
referer
=
'
uniapp
'
const
poimarkerSrc
=
'
https://apis.map.qq.com/tools/poimarker
'
const
src
=
computed
(()
=>
{
const
{
latitude
,
longitude
,
name
,
address
}
=
props
return
latitude
&&
longitude
?
`
${
poimarkerSrc
}
?type=0&marker=coord:
${
latitude
}
,
${
longitude
}
;title:
${
name
}
;addr:
${
address
}
;&key=
${
key
}
&referer=
${
referer
}
`
:
''
})
const
state
=
reactive
({
src
,
isPoimarkerSrc
:
true
,
})
function
check
()
{
function
onRegionChange
(
event
:
{
detail
:
{
centerLocation
:
Point
}
})
{
const
map
=
mapRef
.
value
as
HTMLIFrameElement
const
centerLocation
=
event
.
detail
.
centerLocation
if
(
map
.
src
.
indexOf
(
poimarkerSrc
)
===
0
)
{
if
(
centerLocation
)
{
state
.
isPoimarkerSrc
=
true
state
.
center
.
latitude
=
centerLocation
.
latitude
}
else
{
state
.
center
.
longitude
=
centerLocation
.
longitude
state
.
isPoimarkerSrc
=
false
}
}
}
}
function
nav
()
{
function
nav
()
{
const
map
=
mapRef
.
value
as
HTMLIFrameElement
const
mapInfo
=
getMapInfo
()
const
url
=
`https://map.qq.com/nav/drive#routes/page?transport=2&epointy=
${
let
url
=
''
props
.
latitude
if
(
mapInfo
.
type
===
MapType
.
GOOGLE
)
{
}
&epointx=
${
props
.
longitude
}
&eword=
${
encodeURIComponent
(
const
origin
:
string
=
state
.
location
.
latitude
props
.
name
||
'
目的地
'
?
`&origin=
${
state
.
location
.
latitude
}
%2C
${
state
.
location
.
longitude
}
`
)}
&referer=
${
referer
}
`
:
''
map
.
src
=
url
url
=
`https://www.google.com/maps/dir/?api=1
${
origin
}
&destination=
${
props
.
latitude
}
%2C
${
props
.
longitude
}
`
}
else
if
(
mapInfo
.
type
===
MapType
.
QQ
)
{
const
fromcoord
:
string
=
state
.
location
.
latitude
?
`&fromcoord=
${
state
.
location
.
latitude
}
%2C
${
state
.
location
.
longitude
}
`
:
''
url
=
`https://apis.map.qq.com/uri/v1/routeplan?type=drive
${
fromcoord
}
&tocoord=
${
props
.
latitude
}
%2C
${
props
.
longitude
}
&from=
${
encodeURIComponent
(
'
我的位置
'
)}
&to=
${
encodeURIComponent
(
props
.
name
||
'
目的地
'
)}
&ref=
${
mapInfo
.
key
}
`
}
window
.
open
(
url
)
}
}
function
back
()
{
function
back
()
{
const
map
=
mapRef
.
value
as
HTMLIFrameElement
emit
(
'
close
'
)
if
(
map
.
src
.
indexOf
(
poimarkerSrc
)
!==
0
)
{
}
map
.
src
=
state
.
src
}
else
{
function
move
({
latitude
,
longitude
}:
Point
)
{
emit
(
'
close
'
)
state
.
location
.
latitude
=
latitude
}
state
.
location
.
longitude
=
longitude
check
()
setCenter
({
latitude
,
longitude
})
}
function
setCenter
({
latitude
,
longitude
}:
Point
)
{
state
.
center
.
latitude
=
latitude
state
.
center
.
longitude
=
longitude
}
function
moveToLocation
()
{
getLocation
({
type
:
'
gcj02
'
,
success
:
move
,
fail
:
()
=>
{
// move({
// latitude: 0,
// longitude: 0,
// })
},
})
}
}
return
()
=>
{
return
()
=>
{
return
(
return
(
<
div
class
=
"uni-system-open-location"
>
<
div
class
=
"uni-system-open-location"
>
<
div
<
Map
class
=
{
{
latitude
=
{
state
.
center
.
latitude
}
'
map-content
'
:
true
,
longitude
=
{
state
.
center
.
longitude
}
'
fix-position
'
:
state
.
isPoimarkerSrc
,
class
=
"map"
}
}
markers
=
{
[
state
.
marker
,
state
.
location
]
}
onRegionchange
=
{
onRegionChange
}
>
>
<
iframe
<
div
class
=
"map-move"
onClick
=
{
moveToLocation
}
>
ref
=
{
mapRef
}
{
createSvgIconVNode
(
ICON_PATH_LOCTAION
,
'
#000000
'
,
24
)
}
src
=
{
state
.
src
}
</
div
>
allow
=
"geolocation"
</
Map
>
sandbox
=
"allow-scripts allow-same-origin allow-forms allow-top-navigation allow-modals allow-popups"
<
div
class
=
"info"
>
frameborder
=
"0"
<
div
class
=
"name"
onClick
=
{
()
=>
setCenter
(
state
.
marker
)
}
>
onLoad
=
{
check
}
{
props
.
name
}
/>
</
div
>
{
/* <!-- 去这里 --> */
}
<
div
class
=
"address"
onClick
=
{
()
=>
setCenter
(
state
.
marker
)
}
>
{
state
.
isPoimarkerSrc
&&
<
div
class
=
"actTonav"
onClick
=
{
nav
}
/>
}
{
props
.
address
}
</
div
>
<
div
class
=
"nav"
onClick
=
{
nav
}
>
{
createSvgIconVNode
(
ICON_PATH_NAV
,
'
#ffffff
'
,
26
)
}
</
div
>
</
div
>
</
div
>
<
div
class
=
"nav-btn-back"
onClick
=
{
back
}
>
<
div
class
=
"nav-btn-back"
onClick
=
{
back
}
>
{
createSvgIconVNode
(
ICON_PATH_BACK
,
'
#ffffff
'
,
26
)
}
{
createSvgIconVNode
(
ICON_PATH_BACK
,
'
#ffffff
'
,
26
)
}
...
...
packages/uni-h5/src/view/components/map/MapLocation.tsx
浏览文件 @
453b3fe2
...
@@ -7,6 +7,7 @@ import {
...
@@ -7,6 +7,7 @@ import {
getLocation
,
getLocation
,
}
from
'
../../../service/api
'
}
from
'
../../../service/api
'
//#endif
//#endif
import
{
ICON_PATH_ORIGIN
}
from
'
../../../helpers/location
'
import
{
Maps
,
Map
}
from
'
./maps
'
import
{
Maps
,
Map
}
from
'
./maps
'
import
MapMarker
from
'
./MapMarker
'
import
MapMarker
from
'
./MapMarker
'
...
@@ -34,9 +35,6 @@ export interface Context {
...
@@ -34,9 +35,6 @@ export interface Context {
type
AddMapChidlContext
=
(
context
:
Context
)
=>
void
type
AddMapChidlContext
=
(
context
:
Context
)
=>
void
type
RemoveMapChidlContext
=
(
context
:
Context
)
=>
void
type
RemoveMapChidlContext
=
(
context
:
Context
)
=>
void
const
ICON_PATH
=
'
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAACECAMAAABmmnOVAAAC01BMVEUAAAAAef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef96quGStdqStdpbnujMzMzCyM7Gyc7Ky83MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMz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BjWgx3Ae7dppB6N2wEcF9jdMGDUIDGTaR2aNoM9FqjG7QmaN5CWgc/gIePjG559BigpZQOrYB/4jBfRGRUtDkmJjY6KjLCofkpD62lc2gDfMpWPIuLdwyV8XEpHgaddBZ+wBuSFcwJqSN2ovmZ/dfnOvCTxqGtwzq8SEjv4EhISn48eWgnhUP7DvDSvgzxrs6vV6+FLiro2EkCic4QKkzwJsH1KYreCp0eQhfyDl1B/w4P/xa5JVJ4U03QjbRD9x7wXlgH5IE3wmMBHXoSlugFAcI6f/AkkSi8q6HQm6xDn77wEQ8djTwSj3tqAMguRTe4ikeOQyJ4YV+KfkQl+oNW5GbY4gWOWgbwJ+kwAD6Fi90MK2ZsrIeBBCUGwRXbqJ+/iJMQliIEBhOU6AJhtlG/IpHE2bqrYQg5h6HA4yQiRqwEfkGCdTCMmMRw+IbPDCQaHCsCYAQxiZHw3TbmD/ESOHgHwShiEqPhp/gggYkSztIxxCRawy/bmEniJaJtfwiEscQkxkFgRqJESqQwwHhiEuMBp3Vm8RK/cZoHEzKXhCK2QxEPpiJe0YlKCFaKCNv/cYBNUsBRPlkJSc0U+dM7E9H0ThGJbgZT/iR7yj+VqMS06Qr4+OFm2JdCxIa8lugzkJs5K6MfxAaYPUcBpYG5khZJEkUUSb7DPCnKRfPBXj6M8FwuegoLpCgXcQszVjhbJFUJUee2hBhLoYTIcYtB57KY+opSMdVqwatSlZVj05aV//CwJLMX2DluaUcwhXm4ali2XOoLjxUrPV26zFtF4f5p0Gp310+z13BUWNvbehEXona6iAtX/zVZmtfN4WixfsNky4S6gCCVVq3RPLdfSfpv3MRRZfPoLc6Xs/5bt3EyMGzE9h07/Xft2t15z6i9+zgGg8FgMBgMBoPBYDAYDAYj8/APG67Rie8pUDsAAAAASUVORK5CYII=
'
export
default
/*#__PURE__*/
defineSystemComponent
({
export
default
/*#__PURE__*/
defineSystemComponent
({
name
:
'
MapLocation
'
,
name
:
'
MapLocation
'
,
setup
()
{
setup
()
{
...
@@ -91,7 +89,7 @@ export default /*#__PURE__*/ defineSystemComponent({
...
@@ -91,7 +89,7 @@ export default /*#__PURE__*/ defineSystemComponent({
anchor
=
{
{
x
:
0.5
,
y
:
0.5
}
}
anchor
=
{
{
x
:
0.5
,
y
:
0.5
}
}
width
=
"44"
width
=
"44"
height
=
"44"
height
=
"44"
iconPath
=
{
ICON_PATH
}
iconPath
=
{
ICON_PATH
_ORIGIN
}
{
...
state
}
{
...
state
}
/>
/>
)
:
null
)
:
null
...
...
packages/uni-h5/src/view/components/map/index.tsx
浏览文件 @
453b3fe2
...
@@ -16,6 +16,7 @@ import {
...
@@ -16,6 +16,7 @@ import {
useCustomEvent
,
useCustomEvent
,
}
from
'
@dcloudio/uni-components
'
}
from
'
@dcloudio/uni-components
'
import
{
callOptions
}
from
'
@dcloudio/uni-shared
'
import
{
callOptions
}
from
'
@dcloudio/uni-shared
'
import
{
Point
}
from
'
../../../helpers/location
'
import
{
Maps
,
Map
,
loadMaps
,
LatLng
}
from
'
./maps
'
import
{
Maps
,
Map
,
loadMaps
,
LatLng
}
from
'
./maps
'
import
MapMarker
,
{
import
MapMarker
,
{
Props
as
MapMarkerProps
,
Props
as
MapMarkerProps
,
...
@@ -29,11 +30,6 @@ import MapLocation, {
...
@@ -29,11 +30,6 @@ import MapLocation, {
CONTEXT_ID
as
MAP_LOCATION_CONTEXT_ID
,
CONTEXT_ID
as
MAP_LOCATION_CONTEXT_ID
,
}
from
'
./MapLocation
'
}
from
'
./MapLocation
'
interface
Point
{
latitude
:
number
longitude
:
number
}
const
props
=
{
const
props
=
{
id
:
{
id
:
{
type
:
String
,
type
:
String
,
...
@@ -41,11 +37,11 @@ const props = {
...
@@ -41,11 +37,11 @@ const props = {
},
},
latitude
:
{
latitude
:
{
type
:
[
String
,
Number
],
type
:
[
String
,
Number
],
default
:
39.90374
,
default
:
0
,
},
},
longitude
:
{
longitude
:
{
type
:
[
String
,
Number
],
type
:
[
String
,
Number
],
default
:
116.397827
,
default
:
0
,
},
},
scale
:
{
scale
:
{
type
:
[
String
,
Number
],
type
:
[
String
,
Number
],
...
...
packages/uni-h5/src/view/components/map/maps/index.ts
浏览文件 @
453b3fe2
import
{
MapType
,
getMapInfo
}
from
'
../../../../helpers/location
'
export
*
from
'
./types
'
export
*
from
'
./types
'
import
{
QQMaps
}
from
'
./qq/types
'
import
{
QQMaps
}
from
'
./qq/types
'
import
{
GoogleMaps
}
from
'
./google/types
'
import
{
GoogleMaps
}
from
'
./google/types
'
...
@@ -17,11 +18,6 @@ interface QQMapsWithCallout extends QQMaps, MapsWithCallout {}
...
@@ -17,11 +18,6 @@ interface QQMapsWithCallout extends QQMaps, MapsWithCallout {}
export
type
Maps
=
GoogleMapsWithCallout
|
QQMapsWithCallout
export
type
Maps
=
GoogleMapsWithCallout
|
QQMapsWithCallout
export
enum
MapType
{
QQ
=
'
qq
'
,
GOOGLE
=
'
google
'
,
}
let
maps
:
Maps
let
maps
:
Maps
const
callbacksMap
:
Partial
<
Record
<
MapType
,
Array
<
(
maps
:
Maps
)
=>
void
>>>
=
{}
const
callbacksMap
:
Partial
<
Record
<
MapType
,
Array
<
(
maps
:
Maps
)
=>
void
>>>
=
{}
const
GOOGLE_MAP_CALLBACKNAME
=
'
__map_callback__
'
const
GOOGLE_MAP_CALLBACKNAME
=
'
__map_callback__
'
...
@@ -30,23 +26,20 @@ interface WindowExt extends Window {
...
@@ -30,23 +26,20 @@ interface WindowExt extends Window {
}
}
export
function
loadMaps
(
callback
:
(
maps
:
Maps
)
=>
void
)
{
export
function
loadMaps
(
callback
:
(
maps
:
Maps
)
=>
void
)
{
let
type
:
MapType
const
mapInfo
=
getMapInfo
()
let
key
:
string
if
(
!
mapInfo
.
key
)
{
if
(
__uniConfig
.
qqMapKey
)
{
type
=
MapType
.
QQ
key
=
__uniConfig
.
qqMapKey
}
else
if
(
__uniConfig
.
googleMapKey
)
{
type
=
MapType
.
GOOGLE
key
=
__uniConfig
.
googleMapKey
}
else
{
console
.
error
(
'
Map key not configured.
'
)
console
.
error
(
'
Map key not configured.
'
)
return
return
}
}
const
callbacks
=
(
callbacksMap
[
type
]
=
callbacksMap
[
type
]
||
[])
const
callbacks
=
(
callbacksMap
[
mapInfo
.
type
]
=
callbacksMap
[
mapInfo
.
type
]
||
[])
if
(
maps
)
{
if
(
maps
)
{
callback
(
maps
)
callback
(
maps
)
}
else
if
((
window
as
WindowExt
)[
type
]
&&
(
window
as
WindowExt
)[
type
].
maps
)
{
}
else
if
(
maps
=
(
window
as
WindowExt
)[
type
].
maps
(
window
as
WindowExt
)[
mapInfo
.
type
]
&&
(
window
as
WindowExt
)[
mapInfo
.
type
].
maps
)
{
maps
=
(
window
as
WindowExt
)[
mapInfo
.
type
].
maps
maps
.
Callout
=
maps
.
Callout
||
createCallout
(
maps
)
maps
.
Callout
=
maps
.
Callout
||
createCallout
(
maps
)
callback
(
maps
)
callback
(
maps
)
}
else
if
(
callbacks
.
length
)
{
}
else
if
(
callbacks
.
length
)
{
...
@@ -54,20 +47,20 @@ export function loadMaps(callback: (maps: Maps) => void) {
...
@@ -54,20 +47,20 @@ export function loadMaps(callback: (maps: Maps) => void) {
}
else
{
}
else
{
callbacks
.
push
(
callback
)
callbacks
.
push
(
callback
)
const
globalExt
=
window
as
WindowExt
const
globalExt
=
window
as
WindowExt
const
callbackName
=
GOOGLE_MAP_CALLBACKNAME
+
type
const
callbackName
=
GOOGLE_MAP_CALLBACKNAME
+
mapInfo
.
type
globalExt
[
callbackName
]
=
function
()
{
globalExt
[
callbackName
]
=
function
()
{
delete
globalExt
[
callbackName
]
delete
globalExt
[
callbackName
]
maps
=
(
window
as
WindowExt
)[
type
].
maps
maps
=
(
window
as
WindowExt
)[
mapInfo
.
type
].
maps
maps
.
Callout
=
createCallout
(
maps
)
maps
.
Callout
=
createCallout
(
maps
)
callbacks
.
forEach
((
callback
)
=>
callback
(
maps
))
callbacks
.
forEach
((
callback
)
=>
callback
(
maps
))
callbacks
.
length
=
0
callbacks
.
length
=
0
}
}
const
script
=
document
.
createElement
(
'
script
'
)
const
script
=
document
.
createElement
(
'
script
'
)
const
src
=
const
src
=
type
===
MapType
.
GOOGLE
mapInfo
.
type
===
MapType
.
GOOGLE
?
'
https://maps.googleapis.com/maps/api/js?
'
?
'
https://maps.googleapis.com/maps/api/js?
'
:
'
https://map.qq.com/api/js?v=2.exp&libraries=geometry&
'
:
'
https://map.qq.com/api/js?v=2.exp&libraries=geometry&
'
script
.
src
=
`
${
src
}
key=
${
key
}
&callback=
${
callbackName
}
`
script
.
src
=
`
${
src
}
key=
${
mapInfo
.
key
}
&callback=
${
callbackName
}
`
script
.
onerror
=
function
()
{
script
.
onerror
=
function
()
{
console
.
error
(
'
Map load failed.
'
)
console
.
error
(
'
Map load failed.
'
)
}
}
...
...
packages/uni-h5/style/api/location-picker.css
浏览文件 @
453b3fe2
...
@@ -25,7 +25,6 @@
...
@@ -25,7 +25,6 @@
height
:
52px
;
height
:
52px
;
margin-left
:
-16px
;
margin-left
:
-16px
;
cursor
:
pointer
;
cursor
:
pointer
;
background-image
:
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAACcCAMAAAC3Fl5oAAAB3VBMVEVMaXH/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/EhL/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/Dw//AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/AAD/GRn/NTX/Dw//Fhb/AAD/AAD/AAD/GRn/GRn/Y2P/AAD/AAD/ExP/Ghr/AAD/AAD/MzP/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nBWsr8KbRNUGYt5LXgd6HtD3lNQIoyN4S2G5RJIUOZm0LbTcqsBqVmhLYZSlkPsP4VWf+Rrd+m1v9o9h8Vv5p42C1R5qL1x7WRglOgVN52yfwNOBu76P+lLPoYidu23KPciIHGa07ZeIW1jvcNtI7q5vexCPGYCmf+m/Y9a3sAwQ5bI9T7ukPgPcn9GToEao+xk1OixJT+GIsvNAbx6eAgPq0xiF+KtkpYKhRXCQ8eFFcJhSWGu3rZ8jJkCM8kz9K4TUnrC6mAgzTsB9tLwQ2W15qfosQ2GrQNpZr7aczbzVjBZsvLcaC1g0bsbIVEnU8DOr6H1KDH2LwtUBi0/JII6Dxm9zUXkH+XMWzfh1Dte1i2Pe3QkC77Zel7aehpO8wyHG6Dtt0NjKxhN6I4uSli/TqJiJJDUQ4NDCURXTrXRy1XcumyD24M+AzhD1RXIIZsl/LoyZmurJHDM7s8lvB2FQ/PmPJ6PseAXP5HGMYAAC7ABbgAF+ACXIALcAEuwAW4ABfgAlyAC3ABLsAFuID/d8Cx4NEt8/byOf0wLnis8zjMq9/Kp7bWw4JOj8u8TlhRl+G/Mp2wpOX48GffvvZ1CyL4B53LAS6zb08EAAAAAElFTkSuQmCC")
;
background-size
:
100%
;
background-size
:
100%
;
}
}
...
...
packages/uni-h5/style/api/location-view.css
浏览文件 @
453b3fe2
...
@@ -9,6 +9,79 @@
...
@@ -9,6 +9,79 @@
z-index
:
999
;
z-index
:
999
;
}
}
.uni-system-open-location
.map
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
bottom
:
80px
;
height
:
auto
;
}
.uni-system-open-location
.info
{
position
:
absolute
;
bottom
:
0
;
left
:
0
;
width
:
100%
;
height
:
80px
;
background-color
:
white
;
padding
:
15px
;
box-sizing
:
border-box
;
line-height
:
1.5
;
}
.uni-system-open-location
.info
>
.name
{
font-size
:
17px
;
color
:
#111111
;
}
.uni-system-open-location
.info
>
.address
{
font-size
:
14px
;
color
:
#666666
;
}
.uni-system-open-location
.info
>
.nav
{
position
:
absolute
;
top
:
50%
;
right
:
15px
;
width
:
50px
;
height
:
50px
;
border-radius
:
50%
;
margin-top
:
-25px
;
background-color
:
#007aff
;
}
.uni-system-open-location
.info
>
.nav
>
svg
{
display
:
block
;
width
:
100%
;
height
:
100%
;
padding
:
10px
;
box-sizing
:
border-box
;
}
.uni-system-open-location
.map-move
{
position
:
absolute
;
bottom
:
50px
;
right
:
10px
;
width
:
40px
;
height
:
40px
;
box-sizing
:
border-box
;
line-height
:
40px
;
background-color
:
white
;
border-radius
:
50%
;
pointer-events
:
auto
;
cursor
:
pointer
;
box-shadow
:
0px
0
5px
1px
rgba
(
0
,
0
,
0
,
0.3
);
}
.uni-system-open-location
.map-move
>
svg
{
display
:
block
;
width
:
100%
;
height
:
100%
;
box-sizing
:
border-box
;
padding
:
8px
;
}
.uni-system-open-location
.nav-btn-back
{
.uni-system-open-location
.nav-btn-back
{
position
:
absolute
;
position
:
absolute
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录