Skip to content

Instantly share code, notes, and snippets.

@seaukara
Created February 24, 2017 20:32
Show Gist options
  • Save seaukara/c7e1d6d206a9582eea67fce52e6bf413 to your computer and use it in GitHub Desktop.
Save seaukara/c7e1d6d206a9582eea67fce52e6bf413 to your computer and use it in GitHub Desktop.
define([
"dojo/_base/declare",
"dijit/_WidgetBase",
"dijit/layout/BorderContainer",
"widgets/mapLayers",
"widgets/ecgi",
"widgets/searchBar",
"dojo/string",
"esri/map",
"esri/dijit/FeatureTable",
"esri/dijit/Search",
"dojo/_base/array",
"dojo/_base/lang",
"dojo/keys",
"dojo/_base/html",
"esri/request",
"dojo/dom-attr",
"dojo/dom-class",
"esri/arcgis/utils",
"dojo/dom-construct",
"dojo/on",
"dojo/dom",
"esri/config",
"esri/layers/FeatureLayer",
"dojo/query",
"dojo/topic",
"dojo/dom-style",
"esri/InfoTemplate",
"dojo/domReady!"
], function (
declare,
_WidgetBase,
BorderContainer,
Map,
Ecgi,
searchBar,
string,
esriMap,
FeatureTable,
Search,
array,
lang,
dojoKeys, html,
esriRequest,
domAttr,
domClass,
esriUtils,
domConstruct,
on,
dom,
FeatureLayer,
esriConfig,
query,
topic,
domStyle,
InfoTemplate
) {
return declare([_WidgetBase], {
startup: function () {
if (location.search == "") {
if (typeof history.pushState !== "undefined") {
history.pushState(null, null, "?Carrier=VZ&T=10&sisterID=");
};
ecgi = new Ecgi();
map = new Map();
search = new searchBar();
mapInstance = this._initializeMap(map);
topic.publish("addECGI", mapInstance);
} else {
ecgi = new Ecgi();
map = new Map();
search = new searchBar();
mapInstance = this._initializeMap(map);
topic.publish("addECGI", mapInstance);
};
},
_initializeMap: function (map) {
var mapInstance = map.getMapInstance();
return mapInstance;
},
});
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment