mapbox / mapbox/mapbox-gl-geocoder
Disable flyTo if geocoding is triggered programmaticly (keep animation for input)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 388
- Forks
- 181
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I'm triggering geocoder.query(""); on map load. However, the animation is very laggy, as it tries to animate while the rest of the page load. Therefore, we wish to disable the flyTo, but only on the geocode.query trigged on map load.
This is how we are triggering it:
map.on('load', function() {
$("#map").css("pointer-events", "none");
geocoder.query('Bali');
});
I know of map.jumpTo, however I can't seem to figure out to solely apply this on the map load query. Any suggestions?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the map load handler and the geocoder.query('Bali') entry point, then trace how query-triggered map animation is selected. No files or tests are mentioned in the issue. Done means programmatic queries can suppress flyTo while queries triggered by user input retain animation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100