title: GoogleMap with Firebase Realtime Database - Javascript
body: <p>How can I show lat, lng data from realtime database on google maps ? </p>
  
  <p>My database structure : </p>
  
  <pre><code>/driversAvailable /A85edr0ers0A89rxartas7c5d1(user's id) /g: 787fe78fe
                                                            l:
                                                              0:45.789454
                                                              1:98.44578
  </code></pre>
  
  <p>My Code : </p>
  
  <pre><code>function initMap(latitude, longitude) {
     var map;
     var database = firebase.database();
     database.ref("driversAvailable//").once('value', function(snapshot) {
       if (snapshot.exists()) {
         snapshot.forEach(function(data) {
           var latitude = l[0].val();
           var longitude = l[1].val();
  
         });
       }
     });
     map = new google.maps.Map(document.getElementById('map'), {
       center: {
         lat: 41.04,
         lng: 29.0778390
       },
       zoom: 12,
       position: {
         lat: parseFloat(latitude),
         lng: parseFloat(longitude)
       }
  
     });
   }
  </code></pre>
  
  <p>Error: </p>
  
  <pre><code>Uncaught ReferenceError: l is not defined
  </code></pre>