jvseagle-co-nz-esridist

esri.toolbars.Draw throws an exception

Discussion created by jvseagle-co-nz-esridist Employee on Mar 1, 2011
Latest reply on Apr 9, 2011 by jvseagle-co-nz-esridist
Dear ArcGIS API for Javascript Team,

When I activate the drawToolbar.activate(esri.toolbars.Draw.POINT) the application throws an exception stating "Microsoft JScript runtime error: Object doesn't support property or method '__resetClickDuration'". In the minimized code it is on map.__resetClickDuration();

Can you provide me some help on this?

Cheers,
Jose

// Piece of code

                var drawToolbar = new esri.toolbars.Draw(map);
                var selectedTemplate;
                dojo.connect(templatePicker, "onSelectionChange", function()
                                                                  {
                                                                      debugger;
                                                                      if(templatePicker.getSelected())
                                                                      {
                                                                          selectedTemplate = templatePicker.getSelected();
                                                                      }
                                                                     
                                                                      switch (selectedTemplate.featureLayer.geometryType)
                                                                      {
                                                                          case "esriGeometryPoint":
                                                                               drawToolbar.activate(esri.toolbars.Draw.POINT);  //THROWS THE EXCEPTION HERE
                                                                          break;
                                                                          case "esriGeometryPolyline":
                                                                               drawToolbar.activate(esri.toolbars.Draw.POLYLINE);
                                                                          break;
                                                                          case "esriGeometryPolygon":
                                                                               drawToolbar.activate(esri.toolbars.Draw.POLYGON);
                                                                          break;
                                                                      }
                                                                  });

Outcomes