<div dir="ltr">Hi guys,<br><br>I'm new on OSM and, in particular, with Leaflet. I have some problem to create a map with more points/markers: I have an array (a matrix) where I have latitude, longitude and description. I have 50 points of interest to show on the map.<br>
I use for 1 point this code:<br><br><div id="map"><br>        <style><br>        #map { height: 500px; }<br>        </style><br>        <script type="text/javascript"><br>        var map = L.map('map').setView([<? echo $dati[1][5]; ?>, <? echo $dati[1][6];?>], 9);<br>
//        var map = L.map('map').setView([40.784027, 17.238874], 15);<br>// 41.133333, 16.85<br><br>        L.tileLayer('http://{s}.<a href="http://tile.cloudmade.com/88ed710d6b7e41d2aad93a3cce1e10d3/997/256/{z}/{x}/{y}.png">tile.cloudmade.com/88ed710d6b7e41d2aad93a3cce1e10d3/997/256/{z}/{x}/{y}.png</a>', {<br>
            attribution: 'Map data &copy; <a href="<a href="http://openstreetmap.org">http://openstreetmap.org</a>">OpenStreetMap</a> contributors, <a href="<a href="http://creativecommons.org/licenses/by-sa/2.0/">http://creativecommons.org/licenses/by-sa/2.0/</a>">CC-BY-SA</a>, Imagery © <a href="<a href="http://cloudmade.com">http://cloudmade.com</a>">CloudMade</a>',<br>
            maxZoom: 18<br>        }).addTo(map);<br>        var marker = L.marker([<? echo $dati[1][5]; ?>, <? echo $dati[1][6]; ?>]).addTo(map);<br> //       marker.bindPopup("<b><? echo $dati[1][2]; ?></b><br><? echo $dati[1][3]; ?>").openPopup();<br>
        marker.bindPopup("<b><? echo $dati[1][2]; ?></b><br><? echo $dati[1][7]; ?>").openPopup();<br>        </script><br></div><br><br>as suggested in Leaflet Quick Start Guide. If I want to show 50 points (stored in $dati matrix), what code can I use? <br>
I realized if the description to show in the popup is  long, Leaflet don't creates the map, how can I solve this problem?<br>I'm using PHP.<br>Thanks.<br>Giuseppe<br></div>