MongoDB.Driver.Builders.GeoNearOptionsBuilder.SetDistanceMultiplier C# (CSharp) Method

SetDistanceMultiplier() public method

Sets the distance multiplier.
public SetDistanceMultiplier ( double value ) : GeoNearOptionsBuilder
value double The distance multiplier.
return GeoNearOptionsBuilder
        public GeoNearOptionsBuilder SetDistanceMultiplier(double value)
        {
            _document["distanceMultiplier"] = value;
            return this;
        }

Usage Example

Example #1
0
 private void cmdGeoNear_Click(object sender, EventArgs e)
 {
     GeoNearOptionsBuilder GeoOption = new GeoNearOptionsBuilder();
     GeoOption.SetDistanceMultiplier(double.Parse(NumDistanceMultiplier.Text));
     GeoOption.SetMaxDistance(double.Parse(NumMaxDistance.Text));
     GeoOption.SetSpherical(chkSpherical.Checked);
     try
     {
         BsonDocument mGeoNearAs = SystemManager.GetCurrentCollection().GeoNearAs<BsonDocument>
             (null, double.Parse(NumGeoX.Text), double.Parse(NumGeoY.Text), (int)NumResultCount.Value, GeoOption).Response;
         MongoDBHelper.FillDataToTreeView("Result", this.trvGeoResult, mGeoNearAs);
         this.trvGeoResult.DatatreeView.Nodes[0].Expand();
     }
     catch (Exception ex)
     {
         SystemManager.ExceptionDeal(ex);
     }
 }
All Usage Examples Of MongoDB.Driver.Builders.GeoNearOptionsBuilder::SetDistanceMultiplier