Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
oEshield
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 39bd917e
authored
Mar 13, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v1.16.3' into 'develop'
修复基站定位解析地址异常 See merge request
!29
2 parents
8c29360b
69f4f2f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
src/utils/mapgeo.js
src/utils/mapgeo.js
View file @
39bd917
...
...
@@ -31,7 +31,7 @@ const MAPGEO = {
let
initIdx
=
i
*
20
;
let
maxIdx
=
i
===
obj
.
times
-
1
?
obj
.
len
:
(
i
+
1
)
*
20
;
for
(
let
idx
=
initIdx
;
idx
<
maxIdx
;
idx
++
)
{
// 防止出现gps点:.00000的错误
if
(
Number
(
data
[
idx
].
elng
)
>
0
&&
Number
(
data
[
idx
].
elat
)
>
0
)
{
lnglatArr
.
push
([
data
[
idx
].
elng
,
data
[
idx
].
elat
])
...
...
@@ -52,7 +52,10 @@ const MAPGEO = {
MAPGEO
.
geocoder
.
getAddress
(
arr
,
function
(
status
,
result
)
{
if
(
status
===
'complete'
&&
result
.
info
===
'OK'
)
{
//获取地址成功
result
.
regeocodes
.
forEach
((
item
,
idx
)
=>
{
data
[
initIdx
+
idx
].
transferAddress
=
item
.
formattedAddress
;
let
o
=
arr
[
idx
]
let
_idx
=
data
.
findIndex
(
k
=>
k
.
elng
==
o
.
lng
&&
k
.
elat
==
o
.
lat
);
//data[initIdx + idx].transferAddress = item.formattedAddress;
data
[
_idx
].
transferAddress
=
item
.
formattedAddress
;
obj
.
totalNum
++
;
});
if
(
obj
.
totalNum
===
obj
.
realNum
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment