plotly / plotly/plotly.js

[BUG]: Clusters within scattermaps fail to display with at least one custom style

Aperta
#7,742 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug
Lingua principale
JavaScript
Stelle
18.3k
Fork
2k
Merge medio
2g 12h
PR unite (30g)
28

Descrizione

Description

I am attempting to add clusters to a Plotly.js scattermap that uses a custom style ("https://tiles.openfreemap.org/styles/bright") for the map's style argument. When clusters are disabled, the map appears as expected:

Image

Meanwhile, when clusters are enabled, only points not grouped into a cluster (i.e. Honolulu) are visible:

Image

When I checked my console, I saw the following error:

Image

Basically, the clusters appear to require a specific font (Open Sans Regular) for the cluster labels, but this font isn't available within openfreemap's server. (In other words, Plotly is requesting font information from https://tiles.openfreemap.org/fonts/Open%20Sans%20Regular/0-255.pbf , but that page shows a 404 Not Found message.)

One option would of course be for OpenFreeMap to add this font to their server, but it would be preferable to modify the library, if possible, to not require this particular font. (If there's already an option to do so, please let me know.) If that wouldn't be possible, perhaps the library could be updated to show clusters but not labels? That would still be a major improvement.

Thank you in advance for your assistance!

Steps to reproduce

Here is a Codepen that demonstrates this functionality. Note that, if you zoom in enough, the underlying clusters' dots will begin to appear. Thus, the issue is with clusters rather than their data.

Notes

One of my reasons for using this custom library is that, based on my correspondence with Carto, our organization may need to pay a substantial amount of money to use Carto's own tiles for our work. This is not the case with OpenFreeMap, which is why I strongly prefer using them in place of Carto. If I'm misunderstanding this licensing situation, just let me know.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riproduci il malfunzionamento con il CodePen collegato utilizzando lo stile personalizzato di OpenFreeMap e i cluster scattermap abilitati. Ispeziona il punto di ingresso del rendering dei cluster scattermap e la richiesta del font mostrata nel report; il lavoro è completato quando i punti raggruppati vengono renderizzati con quello stile senza richiedere un font non disponibile, oppure quando viene stabilita chiaramente la limitazione supportata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript
Ambito
data-visualization, frontend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.