title: Mapbox dynamic markers in Meteor.js
body: <p>Able to successfully set the mapbox viewpoint dynamically by passing the geocoder a street address stored in my database. </p>
  
  <p>But rather than just setting the map view to the address, I want to draw a marker at the address' location. </p>
  
  <pre><code>Template.vendorPage.rendered = function(){
  
  
  //get address from database by ID
  address = function(){
      pathname =location.pathname.split("/"); 
      thisId = pathname[2]; 
      return Vendors.findOne({_id: thisId}).address
  }
  //set variable to the address function
  thisAddress = address(); 
  
  //draw the mapbox
  L.mapbox.accessToken = '&lt;My Token Here&gt;';
  var geocoder = L.mapbox.geocoder('mapbox.places-v1'),
      map = L.mapbox.map('map', 'alexnetsch.j786e624');
  
  geocoder.query(thisAddress, showMap);
  
  function showMap(err, data) {
      // The geocoder can return an area, like a city, or a
      // point, like an address. Here we handle both cases,
      // by fitting the map bounds to an area or zooming to a point.
      if (data.lbounds) {
          map.fitBounds(data.lbounds);
      } else if (data.latlng) {
          map.setView([data.latlng[0], data.latlng[1]], 16);
      }
  }
  
  
  }
  </code></pre>
  
  <p>Played around with the documentation for hours and can't figure it out. I'd like to simply pass the marker function 'thisAddress' </p>
  
  <p>Seems like rather than setting the viewport, I could set the map to be zoomedin and centered around my marker.</p>
  
  <p>Here is the example from the documentation but without Geocoding the location.  </p>
  
  <pre><code>L.mapbox.accessToken = 'pk.eyJ1IjoiYWxleG5ldHNjaCIsImEiOiJsX0V6Wl9NIn0.i14NX5hv3bkVIi075nOM2g';
  var map = L.mapbox.map('map', 'examples.map-20v6611k')
      .setView([38.91338, -77.03236], 16);
  
  L.mapbox.featureLayer({
      // this feature is in the GeoJSON format: see geojson.org
      // for the full specification
      type: 'Feature',
      geometry: {
          type: 'Point',
          // coordinates here are in longitude, latitude order because
          // x, y is the standard for GeoJSON and many formats
          coordinates: [
            -77.03221142292,
            38.913371603574 
          ]
      },
      properties: {
          title: 'Peregrine Espresso',
          description: '1718 14th St NW, Washington, DC',
          // one can customize markers by adding simplestyle properties
          // https://www.mapbox.com/foundations/an-open-platform/#simplestyle
          'marker-size': 'large',
          'marker-color': '#BE9A6B',
          'marker-symbol': 'cafe'
      }
  }).addTo(map);
  </code></pre>