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 origin from default searches #1003

Merged
merged 3 commits into from
Jan 18, 2019

Conversation

OtterleyW
Copy link
Contributor

Remove origin from default-location-searches.js because it is not needed for Mapbox or Google Maps.

According to Google Maps documentation using origin parameter is optional unless you specify an origin_place_id in your URL and according to Mapbox documentation origin parameter is needed only when using the Directions API. Neither of these is used in FTW.

Copy link
Contributor

@Gnito Gnito left a comment

Choose a reason for hiding this comment

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

Sorry, I forgot to mention that there is one use case where the origin is used:
if sortSearchByDistance is set to true in config.js, the origin should be sent to Flex API.

By default, this feature is turned off since it gives funny results on search page (map view) with pagination, page results are spread on a "results distance circle" per pagination page. However, it is useful if someone wants to give more impact to distance (and less to map view). I.e. creates a list view for search results like we have in Go.

So, I have one small request: add a comment to config.js next to sortSearchByDistance that default searches need origin if the flag is turned on. (The use case is so rare that this story of removing the origin from default searches makes sense - it serves much wider audience.)

@OtterleyW OtterleyW force-pushed the remove-origin-from-default-searches branch from fda73ef to 99a50cd Compare January 18, 2019 11:24
@OtterleyW OtterleyW merged commit aa8c09e into master Jan 18, 2019
@OtterleyW OtterleyW deleted the remove-origin-from-default-searches branch January 18, 2019 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants