title: How to load map for specific country by leaflet js
body: <p>here i got a sample code which shows the same but i like to know from where to arrange the lat lang for any specific country or city.</p>
  
  <p>here map done for London</p>
  
  <pre><code>var london = new L.LatLng(51.505, -0.09); 
  map.setView(london, 13);
  </code></pre>
  
  <p>so if some one knows the LatLng for specific country then it is possible. but just tell is there source exist which tell me the latlang for any country or city. </p>
  
  <h2>here is full sample code</h2>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
     &lt;title&gt;Leaflet Events Example&lt;/title&gt;
  
     &lt;link rel="stylesheet" href="leaflet/leaflet.css" /&gt;
     &lt;!--[if lte IE 8]&gt;&lt;link rel="stylesheet" href="leaflet/leaflet.ie.css" /&gt;&lt;![endif]--&gt;
  
     &lt;script src="leaflet/leaflet.js"&gt;&lt;/script&gt;
  
     &lt;script language="javascript"&gt;
        var map;
        var popup = L.popup();
  
        function init() {
  
           map = new L.Map('map');
           popup = new L.Popup();
  
           L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
              attribution: '&amp;copy; &lt;a href="http://openstreetmap.org"&gt;OpenStreetMap&lt;/a&gt; contributors',
              maxZoom: 18
           }).addTo(map);
           map.attributionControl.setPrefix(''); // Don't show the 'Powered by Leaflet' text.
  
           var london = new L.LatLng(51.505, -0.09); 
           map.setView(london, 13);
  
  
           map.on('click', onMapClick);
        }
  
        //Listener function taking an event object 
        function onMapClick(e) {
           //map click event object (e) has latlng property which is a location at which the click occured.
           popup
             .setLatLng(e.latlng)
             .setContent("You clicked the map at " + e.latlng.toString())
             .openOn(map);
        }
  
     &lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body onLoad="javascript:init();"&gt;
     &lt;div id="map" style="height: 200px"&gt;&lt;/div&gt; &lt;!-- width equals available horizontal space by default --&gt;
  
  &lt;/body&gt;                                                                                                                          
  &lt;/html&gt;
  </code></pre>
  
  <h2>Another code</h2>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
     &lt;title&gt;Leaflet marker array example&lt;/title&gt;
  
     &lt;link rel="stylesheet" href="leaflet/leaflet.css" /&gt;
     &lt;!--[if lte IE 8]&gt;&lt;link rel="stylesheet" href="leaflet/leaflet.ie.css" /&gt;&lt;![endif]--&gt;
  
     &lt;script src="leaflet/leaflet.js"&gt;&lt;/script&gt;
  
     &lt;script language="javascript"&gt;
        function init() {
           var map = new L.Map('map');                       
  
           L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
              attribution: '&amp;copy; &lt;a href="http://openstreetmap.org"&gt;OpenStreetMap&lt;/a&gt; contributors',
              maxZoom: 18
           }).addTo(map);
           map.attributionControl.setPrefix(''); // Don't show the 'Powered by Leaflet' text.
  
           var london = new L.LatLng(51.5056,-0.1213); 
           map.setView(london, 13);
  
           // Define an array. This could be done in a seperate js file.
           // This tidy formatted section could even be generated by a server-side script
           // or fetched seperately as a jsonp request.
           var markers = [
              [ -0.1244324, 51.5006728, "Big Ben" ],
              [ -0.119623, 51.503308, "London Eye" ],
              [ -0.1279688, 51.5077286, "Nelson's Column&lt;br&gt;&lt;a href=\"https://en.wikipedia.org/wiki/Nelson's_Column\"&gt;wp&lt;/a&gt;" ] 
           ];
  
           //Loop through the markers array
           for (var i=0; i&lt;markers.length; i++) {
  
              var lon = markers[i][0];
              var lat = markers[i][1];
              var popupText = markers[i][2];
  
               var markerLocation = new L.LatLng(lat, lon);
               var marker = new L.Marker(markerLocation);
               map.addLayer(marker);
  
               marker.bindPopup(popupText);
           }
       }
     &lt;/script&gt;
  &lt;/head&gt;
  &lt;body onLoad="javascript:init();"&gt;
     &lt;div id="map" style="height: 200px"&gt;&lt;/div&gt;
  
  &lt;/body&gt;                                                                            
  &lt;/html&gt;
  </code></pre>
  
  <p>thanks</p>