<% content_for :head do %> <%= stylesheet_link_tag("https://unpkg.com/leaflet@1.7.1/dist/leaflet.css", integrity: "sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A==", crossorigin: '') %> <%= javascript_include_tag("https://unpkg.com/leaflet@1.7.1/dist/leaflet.js", integrity: "sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA==", crossorigin: '') %> <% end %>

Bienvenue à l'atelier carto d'IN COMMON

<%= tag.div(id: 'map') %> <% content_for :debug do %>

Premier élément de la liste:

<% res = @resources.first %>

<%= res.feature["properties"]["name"] %>

<%= res.feature["geometry"]["coordinates"] %>

<% end %> <% content_for :body_end do %> <% end %>