I have a web site that uses ArcGIS JavaScript 3.36. There are many modules based on this library and on dojo and dijit. For example, in main page index.html there is such part
require(["dojo/parser",
"dojo/window",
"dojo/on",
"mapaSimple/MapSettings",
"mapaSimple/BaseMapsMenuFacade",
"mapaSimple/SearchMenuFacade",
and in module SearchMenuFacade.js I use
define([
"dojo/_base/declare",
"dijit/form/Button",
"mapaSimple/SearchMenuBuilder",
"mapaSimple/SearchMenuDialogRender",
"mapaSimple/SearchMenuActivity",
"dojo/i18n!mapa/nls/Resources"
],
function(
declare,
Button,
SearchMenuBuilder,
SearchMenuDialogRender,
SearchMenuActivity,
Resources
) {
return declare(null, {
map: null,
menuButton: null,
setPointPosition: null,
constructor: function(map) {
this.map = map;
},
createMenuButton: function() {
var searchMenuBuilder = new SearchMenuBuilder(this.map);
var searchMenuDialogRender = new SearchMenuDialogRender();
this.menuButton = new Button({
class: "menuButton menuSearchButton",
iconClass: "menuSearchIcon",
label: Resources.menu.search.button
, onClick: function () {
searchMenuDialogRender.dialog.opened = true;
dojo.style(searchMenuDialogRender.dialog.domNode, 'visibility', 'hidden');
searchMenuDialogRender.dialog.show().then(function () {
dojo.style(searchMenuDialogRender.dialog.domNode, 'top', '100px');
if (getCurrentLanguage() != "en")
dojo.style(searchMenuDialogRender.dialog.domNode, 'right', '230px');
else
dojo.style(searchMenuDialogRender.dialog.domNode, 'left', '50px');
dojo.style(searchMenuDialogRender.dialog.domNode, 'visibility', 'visible');
});;
}
}, "menuSearchButton");
and so on. Here SearchMenuBuilder and others are different modules that also use dojo objects, "menuSearchButton" is html tag in index.html. In index.html is link to the library:
<script src="https://js.arcgis.com/4.28/"></script>
and also
var dojoConfig = {
paths: { mapaSimple: location.pathname.replace(/\/[^/]+$/, "") + tail }
};
But when I browse the page I see many errors showing that dojo objects not found. How this could be fixed?