Improve mapbox.style description + use mapbox-gl v1.1.1#4035
Conversation
|
This description is much clearer 👍 |
|
💃 from me |
|
More from @nicolaskruchten on slack: what does this line mean? https://github.com/plotly/plotly.js/blob/master/src/plots/mapbox/layout_attributes.js#L141 Is this line up to date wrt to would be good to clarify this line if it only applies when these will be addressed in this PR. |
|
Would be good to point out that this is only needed for certain values of |
|
The relationship between |
|
The attr for ... or something. that's basically a clearer description of the current behaviour and assumptions IMO. |
That's not exactly true, here's the logic: plotly.js/src/traces/choroplethmapbox/plot.js Lines 106 to 132 in 14133af The default |
|
Based off this branch's latest commit here are some TODOs that will done on this branch:
done in b933528
done in b933528
|
|
This is already a big set of improvements, thank you very much :) One small adjustment to my initial proposal: the phrase |
... when trying to plot a mapbox subplot w/o a Mapbox access token and
w/o setting a Mapbox-served style as opposed to simply
throwing a "missing token" msg.
Also, rename constants.styles -> constants.stylesNonMapbox
|
@plotly/plotly_js @nicolaskruchten this PR is now Note that I merged master (with @antoinerg 's attributions and non-mapbox styles work) and I bumped |
mapbox.style descriptionmapbox.style description + use mapbox-gl v1.1.1
| 'Source can be either a URL,', | ||
| 'a geojson object (with `sourcetype` set to *geojson*)', | ||
| 'or an array of tile URLS (with `sourcetype` set to *vector*).' | ||
| 'or an array of URLs (with `sourcetype` set to *vector* or *raster*).' |
There was a problem hiding this comment.
what does sourcetype have to be if source is a URL?
There was a problem hiding this comment.
And actually I would leave the word "tile" in there, as it's not super clear what the URL should point to otherwise. We should try to say what the non-array URL should point to also: an image? a GeoJSON file?
There was a problem hiding this comment.
Now this is:
plotly.js/src/plots/mapbox/layout_attributes.js
Lines 137 to 142 in 29c2bf9
| 'With `sourcetype` set to *geojson*, *circle*, *line*, *fill* and *symbol* are available', | ||
| 'but note that *line* and *fill* are not compatible with Point', | ||
| 'GeoJSON geometries.', | ||
| 'With `sourcetype` set to *vector*, *circle*, *line*, *fill* and *symbol* are available.', |
There was a problem hiding this comment.
| 'With `sourcetype` set to *vector*, *circle*, *line*, *fill* and *symbol* are available.', | |
| 'With `sourcetype` set to *vector*, the following values are allowed: *circle*, *line*, *fill* and *symbol*.', |
There was a problem hiding this comment.
Now this is:
plotly.js/src/plots/mapbox/layout_attributes.js
Lines 170 to 178 in 29c2bf9
|
💃 thanks very much, this is a huge step up in terms of users' ability to bootstrap their understanding of how to do things :) |
@plotly/plotly_js @nicolaskruchten