Skip to content

Commit

Permalink
[16.0][Feature] add website_geoengine_store_locator
Browse files Browse the repository at this point in the history
  • Loading branch information
Hadrien Huvelle authored and peluko00 committed Jan 10, 2025
1 parent 032f47b commit 54c67a5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
34 changes: 17 additions & 17 deletions base_geoengine/expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,23 +97,23 @@ def get_geo_func(current_operator, operator, left, right, params, table):
"""
This method will call the SQL query corresponding to the requested geo operator
"""
match operator:
case "geo_greater":
query = current_operator.get_geo_greater_sql(table, left, right, params)
case "geo_lesser":
query = current_operator.get_geo_lesser_sql(table, left, right, params)
case "geo_equal":
query = current_operator.get_geo_equal_sql(table, left, right, params)
case "geo_touch":
query = current_operator.get_geo_touch_sql(table, left, right, params)
case "geo_within":
query = current_operator.get_geo_within_sql(table, left, right, params)
case "geo_contains":
query = current_operator.get_geo_contains_sql(table, left, right, params)
case "geo_intersect":
query = current_operator.get_geo_intersect_sql(table, left, right, params)
case _:
raise NotImplementedError(f"The operator {operator} is not supported")

if operator == "geo_greater":
query = current_operator.get_geo_greater_sql(table, left, right, params)
elif operator == "geo_lesser":
query = current_operator.get_geo_lesser_sql(table, left, right, params)
elif operator == "geo_equal":
query = current_operator.get_geo_equal_sql(table, left, right, params)
elif operator == "geo_touch":
query = current_operator.get_geo_touch_sql(table, left, right, params)
elif operator == "geo_within":
query = current_operator.get_geo_within_sql(table, left, right, params)
elif operator == "geo_contains":
query = current_operator.get_geo_contains_sql(table, left, right, params)
elif operator == "geo_intersect":
query = current_operator.get_geo_intersect_sql(table, left, right, params)
else:
raise NotImplementedError(f"The operator {operator} is not supported")
return query


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ export class GeoengineRenderer extends Component {
.getSource()
.getExtent();
var infinite_extent = [Infinity, Infinity, -Infinity, -Infinity];
if (extent !== infinite_extent) {
if (JSON.stringify(extent) !== JSON.stringify(infinite_extent)) {
var map_view = this.map.getView();
if (map_view) {
map_view.fit(extent, {maxZoom: 15});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ export class RecordsPanel extends Component {
*/
filterItems(value, items) {
const lowerValue = value.toLowerCase();
return items.filter(
(item) => item.data.display_name.toLowerCase().indexOf(lowerValue) >= 0
return items.filter((item) =>
item.data && item.data.display_name
? item.data.display_name.toLowerCase().indexOf(lowerValue) >= 0
: false
);
}
}
Expand Down

0 comments on commit 54c67a5

Please sign in to comment.