lib/index.js
function(selected){
    // clean up any old marker that might be present
    this._removeMarker();
    var defaultMarkerOptions = {
      color: '#4668F2'
    }
    var markerOptions = extend({}, defaultMarkerOptions, this.options.marker)
    this.mapMarker = new this._mapboxgl.Marker(markerOptions);
    this.mapMarker
      .setLngLat(selected.center)
      .addTo(this._map);
    return this;
  }
function(selected){
    // clean up any old marker that might be present
    this._removeMarker();
    var defaultMarkerOptions = {
      color: '#4668F2'
    }
    var markerOptions = extend({}, defaultMarkerOptions, this.options.marker)
    this.mapMarker = new this._mapboxgl.Marker(markerOptions);
    this.mapMarker
      .setLngLat(selected.center)
      .addTo(this._map);
    return this;
  }
function ( selected ) { // clean up any old marker that might be present this . _removeMarker ( ) ; var defaultMarkerOptions = { color : '#4668F2' } var markerOptions = extend ( { } , defaultMarkerOptions , this . options . marker ) this . mapMarker = new this . _mapboxgl . Marker ( markerOptions ) ; this . mapMarker . setLngLat ( selected . center ) . addTo ( this . _map ) ; return this ; }
Handle the placement of a result marking the selected result
@private
@param {Object} selected the selected geojson feature
@returns {MapboxGeocoder} this
Handle the placement of a result marking the selected result