Skip to content

Commit ac08639

Browse files
committed
map: put map lib local + disable zoom change
1 parent 9996bc3 commit ac08639

File tree

2 files changed

+62
-1
lines changed

2 files changed

+62
-1
lines changed

source/js/maplibre-gl.js

+59
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/localizable/_map_qualif_centers.html.erb

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@
3232
</div>
3333
</section>
3434

35-
<script src="https://unpkg.com/maplibre-gl@^4.7.1/dist/maplibre-gl.js"></script>
35+
<script src="/js/maplibre-gl.js"></script>
3636
<script type="text/javascript">
3737
var map = new maplibregl.Map({
3838
container: 'map', // container id
3939
style: '/js/mapstyle.json', // 'https://demotiles.maplibre.org/style.json', // style URL /js/mapstyle.json
4040
center: [4.4025018, 50.5644843], // [lng, lat]
4141
zoom: 7,
42+
maxZoom: 7,
43+
minZoom: 7,
4244
attributionControl: false,
4345
}).addControl(new maplibregl.AttributionControl({ compact: true }));
4446
<% data.qualification_centers.select{|x|x.pos}.each do |c| %>

0 commit comments

Comments
 (0)