title: Using leaflet with Meteor
body: <p>Hi I'm making a simple app to show leaflet map with meteor.</p>
  
  <p>This simple example is not working</p>
  
  <p>testApp.html : </p>
  
  <pre><code>&lt;head&gt;
    &lt;title&gt;testApp&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;h1&gt;Hello World!&lt;/h1&gt;
    &lt;div id="map"&gt;&lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>testApp.js</p>
  
  <pre><code>if (Meteor.isClient) {
  var map = L.map('map').setView([51.505, -0.09], 13);
    var osmUrl='http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
    var osmAttrib='Map data © OpenStreetMap contributors';
    var osm = new L.TileLayer(osmUrl, {minZoom: 8, maxZoom: 12, attribution: osmAttrib});   
    map.setView(new L.LatLng(51.3, 0.7),9);
    map.addLayer(osm);
  
  }
  
  if (Meteor.isServer) {
    Meteor.startup(function () {
      // code to run on server at startup
    });
  }
  </code></pre>
  
  <p>It's giving me  <code>Uncaught TypeError: Cannot read property '_leaflet' of null</code></p>
  
  <p>if i write the same code in the console , the map shows.</p>
  
  <p>Thank you for your help</p>