Merge branch 'feature/track-user-location-mongodb' into dev
This commit is contained in:
commit
a65254e385
@ -24,6 +24,7 @@
|
||||
{
|
||||
await SetIndexes();
|
||||
await SetUSLocations();
|
||||
await SetBarcelonaLocations();
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,6 +86,20 @@
|
||||
await ctx.Locations.InsertOneAsync(rdm);
|
||||
}
|
||||
|
||||
static async Task SetBarcelonaLocations()
|
||||
{
|
||||
var bcn = new Locations()
|
||||
{
|
||||
Code = "BCN",
|
||||
Description = "Barcelona",
|
||||
LocationId = 5
|
||||
};
|
||||
bcn.SetLocation(2.156453, 41.395226);
|
||||
bcn.SetArea(GetBarcelonaPoligon());
|
||||
await ctx.Locations.InsertOneAsync(bcn);
|
||||
}
|
||||
|
||||
|
||||
static async Task SetIndexes()
|
||||
{
|
||||
// Set location indexes
|
||||
@ -145,5 +160,18 @@
|
||||
new GeoJson2DGeographicCoordinates(-124.68633, 48.8943)
|
||||
};
|
||||
}
|
||||
|
||||
static List<GeoJson2DGeographicCoordinates> GetBarcelonaPoligon()
|
||||
{
|
||||
return new List<GeoJson2DGeographicCoordinates>()
|
||||
{
|
||||
new GeoJson2DGeographicCoordinates(2.033879, 41.383858),
|
||||
new GeoJson2DGeographicCoordinates(2.113741, 41.419068),
|
||||
new GeoJson2DGeographicCoordinates(2.188778, 41.451153),
|
||||
new GeoJson2DGeographicCoordinates(2.235266, 41.418033),
|
||||
new GeoJson2DGeographicCoordinates(2.137101, 41.299536),
|
||||
new GeoJson2DGeographicCoordinates(2.033879, 41.383858)
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user