django dynamique map

i have model detail with x, y numerique coordinate
i would like to set map in template localisation of X, Y in with detail in page HTML

how to that
helps please and thanks

Check out this talk on using Leaflet.js with Django by Paulo Melchiorre:

1 Like

its a great work
i m looking for that
but its most complicated
where i can found example simple to inspire me

That is a “simple” example. What you are looking to do is not trivial and does require some work and effort to understand.

i success to include map leaflet in my template
i am seeking for split my page in two section
one left for map (screen all), other right for data description
i have boostrap4
i put css of map and div map id
when i add id=“map” in div the map come horizontal not vertical

#map { width: 100%; height: 820px; }
<div class="container">

  <div class="row">

    <div class="col-md-6">

      <!-- Your first column here -->

      {% leaflet_map "main" callback="map_init" %} 

      <script type="text/javascript">

    <div class="col-md-6">

      <!-- Your second column here -->




          <button type="button" class="btn btn-primary" data-toggle="modal" data- 

          <button type="button" class="btn btn-primary" data-toggle="modal"





That’s going to be a Leaflet / JavaScript / CSS / Bootstrap issue, not a Django issue. You might find someone here who can help you, but you’re more likely to get more help in a Leaflet-related forum.

1 Like