lundegaard / lundegaard/react-mapy-cz

Map API script should be loaded only once even for multiple maps on page

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

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
4
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Mapy cz API script has to be loaded only once at all times.
Currently it is loaded once per MapProvider, which can render one map instance.

  • Implement logic that finds out if API script is already loaded so it is not injected multiple times.
  • Add possibility for each map to "register" in MapProvider with its own config (center, zoom settings, id, etc)

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 locating MapProvider and the code that injects the Mapy.cz API script. Trace how a provider handles one map, then verify that multiple maps share one script while each registers its own center, zoom, id, and other configuration; done means both requirements work together without duplicate script injection.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
api, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.