Custom Data - add color picker
Followup from the recent PMTiles / Vector Tiles work: #1016
We should add a color picker to the custom data, it's all just cyan #00ffff for now
Remember to increase the height of where custom data could be seem sim different zoom levels
It might also be an option to allow using style data via the simple style spec like geojson.io and others do:
- Maybe only the line color
strokeproperty to change the color - Maybe the Rapid colorpicker could overwrite this value when needed
Now if you add some custom data widespread geographically, the aerial image goes to all the area that the custom data covers, and you lose where you was, I guess it should remain where you are working and show the custom data on that location...
I'd like to try this one @Bonkles
@lauble Here are some notes!
We have an existing color picker that is used inside the Rapid button in the top of the UI:
Code pointer: https://github.com/facebook/Rapid/blob/main/modules/ui/rapid_colorpicker.js
Straight-up reusing most of this component and placing it inside the custom data section of the sidebar would be excellent. Here's where I'm talking about:
To get there, hit 'f' to bring up the data sidebar, or click the icon in the right-hand sidebar labeled 'Map Data'.
When you get to the point where you want to test your component, here's how you can load some custom data for testing:
Click the Three-dot menu to open the custom data dialog, once there you can enter this URL to load a TON of places data all over the world (Just keep zooming your browser in until you see something):
https://r2-public.protomaps.com/protomaps-sample-datasets/overture-pois.pmtiles
Hit enter, the data should start loading once you zoom in enough.
Notice that the URL of the window has added it as &data=https://r2-public.protomaps.com/protomaps-sample-datasets/overture-pois.pmtiles.
All the data just uses the same light teal-ish color, which should look like:
Good luck!