Skip to content

Instantly share code, notes, and snippets.

@odoe
Created May 4, 2015 03:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save odoe/699faedd1d192d10c713 to your computer and use it in GitHub Desktop.
Save odoe/699faedd1d192d10c713 to your computer and use it in GitHub Desktop.
Sample Typescript widget for EsriJS
import Map = require('esri/map');
import dojoDeclare = require('dojo/_base/declare');
import _WidgetBase = require('dijit/_WidgetBase');
import _TemplatedMixin = require('dijit/_TemplatedMixin');
var Widget:any = dojoDeclare([_WidgetBase, _TemplatedMixin], {
templateString: '<div></div>',
postCreate() {
var map:Map = new Map(this.domNode, this.get('mapOptions'));
this.set('map', map);
}
});
export = Widget;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment