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 e71bf45c
authored
Mar 13, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop' into 'master'
代码已上线,合并代码到主干 See merge request
!30
2 parents
cbeb5aba
39bd917e
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 @
e71bf45
...
@@ -31,7 +31,7 @@ const MAPGEO = {
...
@@ -31,7 +31,7 @@ const MAPGEO = {
let
initIdx
=
i
*
20
;
let
initIdx
=
i
*
20
;
let
maxIdx
=
i
===
obj
.
times
-
1
?
obj
.
len
:
(
i
+
1
)
*
20
;
let
maxIdx
=
i
===
obj
.
times
-
1
?
obj
.
len
:
(
i
+
1
)
*
20
;
for
(
let
idx
=
initIdx
;
idx
<
maxIdx
;
idx
++
)
{
for
(
let
idx
=
initIdx
;
idx
<
maxIdx
;
idx
++
)
{
// 防止出现gps点:.00000的错误
// 防止出现gps点:.00000的错误
if
(
Number
(
data
[
idx
].
elng
)
>
0
&&
Number
(
data
[
idx
].
elat
)
>
0
)
{
if
(
Number
(
data
[
idx
].
elng
)
>
0
&&
Number
(
data
[
idx
].
elat
)
>
0
)
{
lnglatArr
.
push
([
data
[
idx
].
elng
,
data
[
idx
].
elat
])
lnglatArr
.
push
([
data
[
idx
].
elng
,
data
[
idx
].
elat
])
...
@@ -52,7 +52,10 @@ const MAPGEO = {
...
@@ -52,7 +52,10 @@ const MAPGEO = {
MAPGEO
.
geocoder
.
getAddress
(
arr
,
function
(
status
,
result
)
{
MAPGEO
.
geocoder
.
getAddress
(
arr
,
function
(
status
,
result
)
{
if
(
status
===
'complete'
&&
result
.
info
===
'OK'
)
{
//获取地址成功
if
(
status
===
'complete'
&&
result
.
info
===
'OK'
)
{
//获取地址成功
result
.
regeocodes
.
forEach
((
item
,
idx
)
=>
{
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
++
;
obj
.
totalNum
++
;
});
});
if
(
obj
.
totalNum
===
obj
.
realNum
)
{
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