-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Plot more geojson-aware #1745
Comments
I don’t understand the rationale here and this feels like it will be a bit too magical. Why not use the geo mark, or why not let the user handle the mapping from geo to point/bounds? |
I see this happen a lot during pairing sessions and workshops: people (me included) often start from the geo mark on a geojson, then want to duplicate the mark and change it to something else (e.g. a dot or a text label). There's often a moment of doubt when nothing shows up on the screen. You have to remember to:
I feel that it would be helpful if (some of) these were automagical, in cases where there is no ambiguity. For instance, a {type: "FeatureCollection"} object can't be a data iterator. I understand that the application of the centroid to get x,y is a bit more difficult (since we can have points defined without x or y, e.g. when we're using frameAnchor), but it doesn't seem impossible. |
I've run into this a number of times, finding it easy to forget to append I would have expected centroid transforms -- perhaps only if there is a projection? -- to be geoJSON aware, using logic like this line from the switch (data?.type) {
case "FeatureCollection":
data = data.features;
break; That being said, I'm not familiar with how (if) transforms make checks like that. If nothing else, it would be nice to add a warning when |
Only the geo mark knows that data can be a FeatureCollection of a GeometryCollection. This makes pivoting from Plot.geo to Plot.dot a 3-changes operation:
In the spirit of #1743/#1744 we could have all the marks:
The text was updated successfully, but these errors were encountered: