Simple usage with legend on top of the map
Fields in use in : departements-et-collectivites-doutre-mer-france
(See it on userclub domain)
dep_code |
---|
74 |
01 |
44 |
46 |
Fields in use in : base-nationale-des-lieux-de-covoiturage-en-france
(See it on userclub domain)
dep_code |
---|
74 |
01 |
44 |
46 |
<!-- "dep" context is the official geo-referential from Opendatasoft Data Network -->
<ods-dataset-context context="dep,carpool"
dep-dataset="departements-et-collectivites-doutre-mer-france"
dep-domain="userclub"
carpool-dataset="base-nationale-des-lieux-de-covoiturage-en-france"
carpool-domain="userclub">
<div ods-color-gradient="colorgradient"
ods-color-gradient-context="carpool"
ods-color-gradient-x="dep_code"
ods-color-gradient-serie="COUNT()"
ods-color-gradient-high="rgb(20, 33, 96)"
ods-color-gradient-low="rgb(180, 197, 241)">
<h2>Color departments by number of carpool location</h2>
<div class="map-container">
<ods-map>
<ods-map-layer context="dep"
color-categories="colorgradient['colors']"
color-by-field="dep_code"
color-categories-other="lightgrey"
display="categories"
shape-opacity="0.95"
title="# of carpool parking">
</ods-map-layer>
</ods-map>
<ods-legend title="# of carpool parking"
color-gradient="colorgradient"
display="linear"
no-value-color="lightgrey"
decimal-precision="0"></ods-legend>
</div>
</div>
</div>
</ods-dataset-context>
.map-container {
position: relative;
}
.odswidget.odswidget-legend {
position: absolute;
top: 20px;
left: 57px;
}