var component = registry.byId("myComponentId");
function clearTime(){ ... var component = registry.byId("timeSlider"); registry.remove(component); }
function initSlider() { var component = registry.byId("timeSlider"); alert(component); //if it exists if (component) { registry.remove(component); } var timeSlider = new TimeSlider({ style: "width: 100%;" }, dom.byId("timeSliderDiv")); ...
Try to register the TimeSlider with a different id and destroy it with that new Id.
var customFullExtent = function customFullExtent() { map.centerAndZoom(initialCenter, initialLevel); }; //create as global variable so you can call from HTML lang.setObject("customFullExtent", customFullExtent);
var thing2 = on(stopEdit, "click", function destroyEditor() { if (dom.byId("editDivDyn") != null) { //This is the dynamic DIV where I put the Editor widget var widgets = registry.findWidgets(editPane_pane); // This is one DIV upwards from where the dynamic DIV is placed if (widgets) { arrayUtils.forEach(widgets, function(w) { w.destroyRecursive(false); //Destroys widget and dynamic DOM node w=null; }); } } });
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.