Hello, can anyone guide me in a direction on how to use the esriRequest function in a Web Appbuilder Widget?
I have just started using Web AppBuilder Developer Edition. I started with extending the sample widget Demo with a button
Widget.html:
<div>
<button id="gotoPosition" data-dojo-type="dijit/form/Button" type="button" data-dojo-attach-point="gotoPosition">Go to position</button>
</div>
I then extended the onOpen: function() in widget.js to zoom to a position
...
onOpen: function(){
console.log('onOpen');
var map = this.map;
var Long, Lat;
var LocPoint, point;
//Go to position
on(this.gotoPosition, 'click', lang.hitch(this, function(evt){
console.log('gotoPosition 2');
map.graphics.clear();
Lat = 55;
Long = 15;
LocPoint = new Point([Long,Lat]);
map.centerAndZoom(LocPoint,17);
}));
},
...