Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove focus_selected_layers query view #1162

Merged
merged 1 commit into from
Jun 14, 2018

Conversation

orangejulius
Copy link
Member

@orangejulius orangejulius commented Jun 14, 2018

The "focus selected layers" query was used in the autocomplete endpoint and extends the standard focus query view with hard-coded layers for which the query applies. I'm guessing the original intent was to apply the focus scoring only to non-admin areas, but the list of layers was already out of date, as it was missing streets.

The query is fundamentally problematic with custom layers as well.

I can imagine that there could be problems sorting administrative areas relative to a focus point, but I can also see it being very desirable and something that would currently not be possible with the logic in this query.

While it's tempting to change the query to support custom layers and preserve whatever behavior is obtained by not sorting admin areas by distance, I think it's worth experimenting with the query deleted completely, and normal focus sorting applied.

Connects #1161

@orangejulius orangejulius requested a review from missinglink June 14, 2018 02:22
This query extends the standard focus query view with hardcoded layers
for which the query applies. The intent was to apply the focus scoring
only to non-admin areas, but the list of layers was already out of date,
as it was missing streets.

The query is fundamentally problematic with custom layers as well.
@orangejulius orangejulius force-pushed the remove_focus_selected_layers branch from cbb8249 to 561f079 Compare June 14, 2018 02:23
Copy link
Member

@missinglink missinglink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The theory & the code are 👍

My only concern is how this affects results in the 'real-world' and whether is causes any unintended bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants