Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
MeteorologicalBureau
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5e95e3f1
authored
Mar 13, 2020
by
hank
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of gitlab.maxrocky.com:hanjixin/MeteorologicalBureau into develop
parents
feb4158a
39204c49
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
map/.DS_Store
+0
-0
map/index.html
+3
-1
map/js/Map3D.js
+11
-3
No files found.
map/.DS_Store
View file @
5e95e3f1
No preview for this file type
map/index.html
View file @
5e95e3f1
...
...
@@ -151,6 +151,8 @@
console
.
log
(
currentDetailList
);
if
(
type
==
'MassMarks'
){
window
.
pois
=
map3d
.
addPoisMassMarks
(
currentDetailList
)
}
else
if
(
type
==
'Single'
){
window
.
pois
=
map3d
.
addPoisSingle
(
currentDetailList
)
}
else
{
window
.
pois
=
map3d
.
addPoisMarkerClusterer
(
currentDetailList
)
}
...
...
@@ -158,7 +160,7 @@
});
}
// addPoiByApi('./personal.json')
// addPoiByApi('./led.json')
// addPoiByApi('./led.json'
,'Single'
)
</script>
</body>
...
...
map/js/Map3D.js
View file @
5e95e3f1
import
{
bounds2Path
,
MaskLayer
}
from
"./tools.js"
var
_renderClusterMarker
=
function
(
context
)
{
var
_renderClusterMarker
=
function
(
context
,
count
)
{
var
factor
=
Math
.
pow
(
context
.
count
/
count
,
1
/
18
);
var
div
=
document
.
createElement
(
'div'
);
var
Hue
=
180
-
factor
*
180
;
...
...
@@ -56,7 +56,15 @@ class Map3D {
this
.
cluster
.
removeMarkers
(
pois
)
this
.
map
.
remove
(
pois
)
}
addPoisSingle
(
pois
)
{
//https://lbs.amap.com/api/javascript-api/guide/overlays/massmarker/
//https://lbs.amap.com/api/javascript-api/example/marker/markerclusterer
let
markers
=
[]
pois
.
map
(
item
=>
{
markers
.
push
(
this
.
setPersonalPoint
(
item
))
});
return
markers
}
addPoisMarkerClusterer
(
pois
)
{
//https://lbs.amap.com/api/javascript-api/guide/overlays/massmarker/
//https://lbs.amap.com/api/javascript-api/example/marker/markerclusterer
...
...
@@ -70,7 +78,7 @@ class Map3D {
this
.
cluster
=
new
AMap
.
MarkerClusterer
(
this
.
map
,
markers
,
{
gridSize
:
80
,
renderClusterMarker
:
function
(
context
)
{
//
_renderClusterMarker(context,markers.length);
_renderClusterMarker
(
context
,
markers
.
length
);
}
});
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment