New to leaflet I wrote a bit of code that :
1 - extracts the latitude and a longitude of a town from a data base
2 - displays a map center on that town (OSM in breton).
result :
then I tried to incorporate this bit of code in a laarger prog (id within another id and so on...) ;
unfortunately, the map doest show as it should anymore :
it's always the same piece of code :
<div id="macarte" style="width:545px; height:300px;"></div>
<script type="text/javascript">
var mylat = 47.216667;
var mylong = -1.55;
var carte = L.map('macarte').setView([mylat, mylong], 12);
L.tileLayer('
http://tile.openstreetmap.bzh/br/{z}/{x}/{y}.png',
{maxZoom: 19}).addTo(carte);
</script>
any help welcome !