Skip to content

Commit

Permalink
map: put map lib local + disable zoom change
Browse files Browse the repository at this point in the history
  • Loading branch information
smadbe committed Jan 16, 2025
1 parent 9996bc3 commit ac08639
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 1 deletion.
59 changes: 59 additions & 0 deletions source/js/maplibre-gl.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion source/localizable/_map_qualif_centers.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@
</div>
</section>

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

0 comments on commit ac08639

Please sign in to comment.