I am trying to add a measure widget from the esri samples and I get the following error. error message
I am using boostrap.css and I am wondering if this has an effect on widget loading.
<div class="container-fluid" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'headline',gutters:false">
I am also wondering if these tags conflict with each other. I have trouble getting widgets to show in my map div.
<div id="map" data-dojo-type="dijit/layout/ContentPane" class="is">
I toggle the classes to change the page width and show a side bar menu.
I saw a similar question with no answer.
-
What was the similar question that you saw? Please always provide a link when referencing another question.PolyGeo– PolyGeo ♦2018年01月18日 21:40:40 +00:00Commented Jan 18, 2018 at 21:40
1 Answer 1
The error message of string.substitute could not find key "loadingState" in template
actually refers to a missing variable in the function that is using the "ContentPane" widget.
Take this method that will attempt to load the "dijit/layout/ContentPane" using the parser:
require(["dojo/parser", "dijit/layout/ContentPane", "dojo/domReady!"],
function (parser) {
parser.parse();
});
SOLUTION, add a variable for the missing "loadingState":
require(["dojo/parser", "dijit/layout/ContentPane", "dojo/domReady!"],
function (parser) {
loadingState = "Loading";
parser.parse();
});