mapbox / mapbox/mapbox-gl-geocoder

reconfirm trackProximity zoom threshold is correct

Open
#354 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs discussion
Dominant language
JavaScript
Stars
388
Forks
181
PR merge metrics
No merged PRs in 30d

Description

Currently the trackProximity option will only send the proximity to the Geocoding API at zooms > 9, this is based on proximity being designed for neighbourhood scale so isn't helpful to send when the map is zoomed out.

It appears the logic in the Mapbox Geocoding API may have changed since this was done

https://github.com/mapbox/carmen/blob/0015a66dab6ba8a927cde06b744cb9991f15bd45/lib/util/proximity.js#L116-L150

Although there is still a gaussian curve used to give much more weightings nearby the proximity than away from the proximity, the scale of the curve varies based on type.

country, region based on z6
district, place, locality, postcode, neighborhood based on z12
poi, address based on z14

However since the Geocoding API doesn't support passing an accuracy radius with the proximity coordinates we still should retain some zoom limit to sending the proximity.

I'm opening this ticket so that the geocoding team can weigh in on if the assumptions here about only sending proximity at zoom>9 make sense or if it should be tweaked.

this addresses one of the issues raised in https://github.com/mapbox/mapbox-gl-geocoder/pull/320

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the trackProximity zoom threshold and the referenced carmen proximity.js behavior, then compare the current assumptions with the Geocoding API behavior described in the issue. Done means the geocoding team has decided whether the zoom >9 limit remains appropriate or should be changed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.