Select to view content in your preferred language

Draw widget in calcite

624
2
04-12-2018 05:20 AM
YvesMoisan
Emerging Contributor

Hi All,

I have tweaked the basic viewer template for a customer and I'm looking for ways to add a custom Draw widget (with only some drawing operations allowed, like add point, and my custom symbols).  I have my symbols ready as JSON representations in a separate file.  But my attempts at adding a Draw widget in the main toolbar have failed. 

The template I'm using has this for css :

<link rel="stylesheet" href="https://js.arcgis.com/3.24/esri/themes/calcite/dijit/calcite.css">
<link rel="stylesheet" href="https://js.arcgis.com/3.24/esri/css/esri.css">
<link rel="stylesheet" href="css/styles.css">

I'm willing to spend a bit of time adding the draw widget in the calcite theme, but I see there are many variations of the calcite theme.  Is the Draw widget implemented in any of those variations ? I would appreciate pointers as to how to go about this.  I don't have much time for this so if I could get access to development code bits I would appreciate.

TIA,

Yves

Tags (2)
0 Kudos
2 Replies
KellyHutchins
Esri Frequent Contributor

HI Yves,

What type of issues are you running in to? The Basic Viewer app is built using the 3.x version of the JSAPI so I assume you are trying to integrate the Draw toolbar? It doesn't use the css from the calcite/widget theme so the draw tools should work just fine in an app that is using Calcite. Here's an example:

JS Bin - Collaborative JavaScript Debugging 

YvesMoisan
Emerging Contributor

Thanx Kelly.

0 Kudos