I am having a problem with the bootstrap modal as well. The open modal budget is on the widget, but when I click nothing happens. I've tried using the <a href...> as well the bootstrap button with data-toggle, but neither works. I attached the widget and html files below.
Hi!
I kindly recommend using the Dialog Dijit class. In this way you avoid overloading your application with external dependencies..
Best
Scott,
So there are many issues in your code.
Robert,
Where should I put onClick functions if not in postCreate? By no means do I fully understand the structure of these widgets, so I appreciate your feedback greatly. The only reason I'm using bootstrap is to make my app look a little more phone-friendly.
Scott,
postCreate function will be OK if you want the map click handler added as soon as the widget is created. Many time I will wait for the user to activate a button or the widget to be opened before adding an event like this. A more significant issue is that the map click handler is not removed once your widget is closed.
Robert,
Is there any way I could have an onClick that zooms in 10%? I can't find any function in the API to zoom by %.
Scott,
this.map.extent.expand(1.1); zooms in 10%
https://developers.arcgis.com/javascript/3/jsapi/extent-amd.html#expand
Expands the extent by the factor given. For example, a value of 1.5 will be 50% bigger.
on(this.zoomIn, "click", lang.hitch(this, function(){
this.map.extent.expand(1.1);
}));
this didn't work but doesn't throw any errors. Am i using this wrong?
Scott,
Sorry Use.
this.map.setExtent(this.map.extent.expand(1.1));
Hey Robert,
For some reason that isn't working either. Is there anything else i could do with map.getZoom and map.setZoom?