Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MapLibre
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Boris Mericskay
MapLibre
Commits
2d671fca
Commit
2d671fca
authored
3 years ago
by
Boris Mericskay
Browse files
Options
Downloads
Patches
Plain Diff
Update Clusterthematic.html
parent
d85fafc5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Clusterthematic.html
+21
-12
21 additions, 12 deletions
Clusterthematic.html
with
21 additions
and
12 deletions
Clusterthematic.html
+
21
−
12
View file @
2d671fca
...
...
@@ -2,14 +2,18 @@
<head>
<meta
name=
"viewport"
content=
"initial-scale=1,maximum-scale=1,user-scalable=no"
/>
<script
src=
"https://cdn.maptiler.com/maplibre-gl-js/v1.13.0-rc.4/mapbox-gl.js"
></script>
<link
href=
"https://cdn.maptiler.com/maplibre-gl-js/v1.13.0-rc.4/mapbox-gl.css"
rel=
"stylesheet"
/>
<meta
charset=
'utf-8'
/>
<title>
MapLibreGL / Thematic Clusters Map
</title>
<script
src=
'https://unpkg.com/maplibre-gl@2.1.1/dist/maplibre-gl.js'
></script>
<link
href=
'https://unpkg.com/maplibre-gl@2.1.1/dist/maplibre-gl.css'
rel=
'stylesheet'
/>
<style>
#map
{
position
:
absolute
;
top
:
0
;
right
:
0
;
bottom
:
0
;
left
:
0
;}
#legend
{
left
:
1%
;
position
:
absolute
;
left
:
50px
;
padding
:
10px
;
box-shadow
:
0
1px
2px
rgba
(
0
,
0
,
0
,
0.10
);
line-height
:
2
Opx
;
...
...
@@ -18,7 +22,7 @@
height
:
80px
;
background-color
:
#ffffff
;
opacity
:
0.7
;
font-size
:
20
;
font-size
:
17
;
}
.legend-key
{
display
:
inline-block
;
...
...
@@ -42,7 +46,7 @@
//Map configuration
var
map
=
new
map
box
gl
.
Map
({
var
map
=
new
map
libre
gl
.
Map
({
container
:
'
map
'
,
style
:
'
https://geoserveis.icgc.cat/contextmaps/positron.json
'
,
//Fond de carte
zoom
:
11.7
,
// Zoom
...
...
@@ -183,7 +187,7 @@ var id = props.cluster_id;
var
marker
=
markers
[
id
];
if
(
!
marker
)
{
var
el
=
createDonutChart
(
props
);
marker
=
markers
[
id
]
=
new
map
box
gl
.
Marker
({
marker
=
markers
[
id
]
=
new
map
libre
gl
.
Marker
({
element
:
el
}).
setLngLat
(
coords
);
}
...
...
@@ -308,12 +312,17 @@ r + r0 * y0,
}
// Add navigation control and scale
map
.
addControl
(
new
mapboxgl
.
NavigationControl
({
position
:
'
top-left
'
}));
map
.
addControl
(
new
mapboxgl
.
ScaleControl
({
position
:
'
bottom-right
'
}));
// Add navigation control and scale
var
nav
=
new
maplibregl
.
NavigationControl
();
map
.
addControl
(
nav
,
'
top-left
'
);
var
scale
=
new
maplibregl
.
ScaleControl
({
maxWidth
:
80
,
unit
:
'
metric
'
});
map
.
addControl
(
scale
);
</script>
</body>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment