mapbox / mapbox/mapbox-gl-js

Question: Bad practice to use only setStyle() instead every other function?

Open
#11,469 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged docs :scroll:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

Hello,
i would like to know if it has any disadvantage to use `setStyle()` for any style change like `setLayoutProperty`, `setFilter`, `setPaintProperty`,...

because we also generate the config for the init of the map, it might be easyier for use to always use `setStyle `instead the specific function.

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

The issue names setStyle(), setLayoutProperty(), setFilter(), and setPaintProperty(), but no files, tests, or entry points. Start by locating the API documentation for these methods and comparing their documented behavior; done would require a decided recommendation or documentation change, which the issue does not currently specify.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, web-dev
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
10/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.