mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 16:42:56 +00:00
@@ -312,7 +312,7 @@ const sampleIndexResponse: SCIndexResponse = {
|
||||
sortTypes: ['ducet'],
|
||||
},
|
||||
{
|
||||
fieldName: 'geo.point.coordinates',
|
||||
fieldName: 'geo',
|
||||
onlyOnTypes: [
|
||||
SCThingType.Building,
|
||||
SCThingType.PointOfInterest,
|
||||
@@ -321,7 +321,7 @@ const sampleIndexResponse: SCIndexResponse = {
|
||||
sortTypes: ['distance'],
|
||||
},
|
||||
{
|
||||
fieldName: 'geo.point.coordinates',
|
||||
fieldName: 'geo',
|
||||
onlyOnTypes: [
|
||||
SCThingType.Building,
|
||||
SCThingType.PointOfInterest,
|
||||
@@ -330,7 +330,7 @@ const sampleIndexResponse: SCIndexResponse = {
|
||||
sortTypes: ['distance'],
|
||||
},
|
||||
{
|
||||
fieldName: 'inPlace.geo.point.coordinates',
|
||||
fieldName: 'inPlace.geo',
|
||||
onlyOnTypes: [
|
||||
SCThingType.DateSeries,
|
||||
SCThingType.Dish,
|
||||
|
||||
@@ -28,22 +28,6 @@ export class FoodDataListComponent extends SearchPageComponent {
|
||||
initialize() {
|
||||
this.showDefaultData = true;
|
||||
|
||||
if (this.positionService.position) {
|
||||
this.sortQuery = [
|
||||
{
|
||||
type: 'distance',
|
||||
order: 'asc',
|
||||
arguments: {
|
||||
field: 'geo.point.coordinates',
|
||||
position: [
|
||||
this.positionService.position.longitude,
|
||||
this.positionService.position.latitude,
|
||||
],
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
this.sortQuery = [
|
||||
{
|
||||
arguments: {field: 'name'},
|
||||
@@ -88,5 +72,21 @@ export class FoodDataListComponent extends SearchPageComponent {
|
||||
},
|
||||
type: 'boolean',
|
||||
};
|
||||
|
||||
if (this.positionService.position) {
|
||||
this.sortQuery = [
|
||||
{
|
||||
type: 'distance',
|
||||
order: 'asc',
|
||||
arguments: {
|
||||
field: 'geo',
|
||||
position: [
|
||||
this.positionService.position.longitude,
|
||||
this.positionService.position.latitude,
|
||||
],
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +134,6 @@ export class MapProvider {
|
||||
|
||||
/**
|
||||
* Provide places (buildings and canteens) const result = await this.dataProvider.search(query);
|
||||
|
||||
*
|
||||
* @param contextFilter Additional contextual filter (e.g. from the context menu)
|
||||
* @param queryText Query (text) of the search query
|
||||
@@ -223,7 +222,7 @@ export class MapProvider {
|
||||
type: 'distance',
|
||||
order: 'asc',
|
||||
arguments: {
|
||||
field: 'geo.point.coordinates',
|
||||
field: 'geo',
|
||||
position: [
|
||||
this.positionService.position.longitude,
|
||||
this.positionService.position.latitude,
|
||||
|
||||
Reference in New Issue
Block a user