8
|
1 define(["dojo/_base/declare", "dojo/_base/lang", "implab/safe", "dojo/dom-class", "dojo/dom-construct", "dijit/_TemplatedMixin", "dijit/_WidgetBase"],
|
|
2 function (declare, lang, safe, domClass, domConstruct, _TemplatedMixin, _WidgetBase) {
|
|
3 return declare([_WidgetBase, _TemplatedMixin], {
|
|
4 map : null,
|
|
5 control : null,
|
|
6 elementName : "div",
|
|
7
|
|
8 constructor: function () {
|
|
9 lang.mixin(this, arguments[0]);
|
|
10 safe.argumentNotNull(this.map, "map");
|
|
11 safe.argumentNotNull(this.control, "control");
|
|
12 },
|
|
13
|
|
14 buildRendering : function() {
|
|
15 this.domNode = domConstruct.create(this.elementName);
|
|
16 domClass.add(this.domNode, this.baseClass);
|
|
17 this.control.setTarget(this.domNode);
|
|
18 this.control.setMap(this.map.olMap || this.map);
|
|
19 }
|
|
20 });
|
|
21 }); |