0

I can only find ColorPicker in ArcGIS JavaScript API 3.X, but I'm working on a project using 4.12.

I'm trying to implement ColorPicker to my map to let users to choose colors for Sketch objects.

I've included both 4.12 and 3.29 APIs in my code as well as required "esri/dijit/ColorPicker", then the website just turned into a blank white page. Obviously it doesn't work this way.

So, is there any other way to implement ColotPicker in a API v4.12 project?

2 Answers 2

1

If you look at the 3.x to 4.x Functionality Matrix, it says ColorPicker is "coming soon":

screen capture of 3.x to 4.x Functionality Matrix with color picker highlighted

So one option would be to wait until it's included. If that is not an option, I am not aware of a great way to use the 3.x ColorPicker on the same page that the 4.x API is included - I would probably just use the default HTML Color input in the mean time or some other third-party library.

0

Actually... The 4.x JS API will not add a ColorPicker widget (the 3.x to 4.x "Functionality Matrix" page is out-of-date). Instead, it will be implemented as a Calcite component, which will be used in multiple Esri apps. This is currently being worked on. You can see the issue for tracking this work here: https://github.com/Esri/calcite-components/issues/6

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.