Select to view content in your preferred language

Measurement Widget Problem

4042
8
Jump to solution
11-09-2015 12:47 PM
AshleyPeters
Occasional Contributor III

I've added in the Measurement Widget to my project following the sample provided on the Developers page. I am having a problem with the div that I haven't been able to resolve. As I currently have it added in, I get the pane where I placed it, but I have no icons when I open the widget. I've moved the div around and have made some changes where I get the icons, but have no background. When the icons are visible, the different measurement options work as expected.

Any ideas on how to resolve this?

Here's the body portion of my HTML file:

<body class="nihilo">
    <div id="mainWindow" data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="design:'headline'"
     style="width:100%; height:100%;">
      <div id="header" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'top'">
        <div id="PrintButton" style="position:absolute; right: 20px; top: 10px"></div>
  <div id="title">
  <a id ="logo" href="http://www.outdooralabama.com" target="_blank"><img src="images/OA_Header.png"></a>
  </div>

      </div>
      <div data-dojo-type="dijit.layout.ContentPane" id="leftPane" data-dojo-props="region:'left'">
        <div id="tocDiv"></div>
      </div>
      <div id="map" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'">
    <div style="position:absolute; right:20px; top:25px; z-Index:999;">
    <div data-dojo-type="dijit/TitlePane" data-dojo-props="title:'Switch Basemap', closable:false, open:false">
     <div data-dojo-type="dijit/layout/ContentPane" style="width:380px; height:280px; overflow:auto;">
      <div id="basemapGallery"></div>
     </div>
    </div>
    </div>
    <div style="position:absolute; right:15px; bottom:50px; z-Index:999;">
          <div id="measurementDiv" data-dojo-type="dijit/TitlePane" data-dojo-props="title:'Measurement', closable:false, open:false">

          </div>
        </div>
    <span id="latlong" style="position:absolute; right:20px; top:8px; font-size:80%; color:#FFFFFF; z-index:50;"></span>
    <div id="HomeButton"></div>
    <div id="search"></div>
   </div>
    </div>
  </body>
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

I would have to see your code but it sounds like you have a JS block from dojoConfig preload true and are also using parser.parse in your app. That will cause the error you mentioned.

View solution in original post

0 Kudos
8 Replies
RobertScheitlin__GISP
MVP Emeritus

Ashley,

  Your code seems to be missing. Make sure you are using the advanced editor and then you can format your code using the >> button and choosing "Syntax Highlighting > Javascript

0 Kudos
AshleyPeters
Occasional Contributor III

I'm not sure what happened, it looked right on my screen when I posted. Should be corrected.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Ashley,

   I can't tell whats wrong for the html body portion. The one thing I see is the mixture or Legacy and standard data-dojo-types.

dijit/layout/ContentPane VS dijit.layout.ContentPane the dot version is legacy and should be change to the slash version.

0 Kudos
AshleyPeters
Occasional Contributor III

I've changed them to the slash version, but it did not resolve the problem.

0 Kudos
AshleyPeters
Occasional Contributor III

I'm also receiving this error: Error: Tried to register widget with id==dijit_layout_ContentPane_0 but that id is already registered

Could that be causing the problem I'm having? Is it possibly a CSS issue?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

I would have to see your code but it sounds like you have a JS block from dojoConfig preload true and are also using parser.parse in your app. That will cause the error you mentioned.

0 Kudos
AshleyPeters
Occasional Contributor III

I am using parser.parse in my app. Not so sure about the other, but I'll look around for it!

0 Kudos
AshleyPeters
Occasional Contributor III

Thanks Robert! I got that issue straightened out. I now have a couple of other things to work on to get measure working the way it should, but this probably has me headed in the right direction. Thanks again!

0 Kudos