Popup Widget - Auto Zoom to

655
3
Jump to solution
11-06-2017 12:16 AM
RodWoodfordOld
Occasional Contributor III

Hi Robert,

Hope things are going well. Not sure if anyone has asked for this, but is it possible to configure the widget to auto zoom to when the map view is clicked. If not, can the ZOOM TO SELECTED button be placed at the top of the display so users can see it without the need for scrolling down the panel. Users just don't see it if there are many returned attributes. Any advice would be useful.

cheers

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Rod,

   I don't think I want to do this permanently so here is the change you can make for your end. Replace the Widget.html content with this:

<div style="width: 100%;height:100%;">
  <div data-dojo-attach-point="header" class="popupheader">
    <div data-dojo-attach-point="instructions" style="width:100%;">${nls.selectfeatures}</div>
    <div data-dojo-attach-point="pager" style="display:none;">
      <div data-dojo-attach-point="featureCount" style="float:left;cursor:default;"></div>
      <a class="clear" href="#" data-dojo-attach-point="btnClear" title="${nls.cleartip}">${nls.clear}</a>
      <div class="titleButton next" title="${nls.next}" data-dojo-attach-point="next"></div>
      <div class="titleButton prev hidden" title="${nls.previous}" data-dojo-attach-point="previous" ></div>
    </div>
  </div>
  <div class="esriPopup esriViewPopup" style="width: 100%;">
    <div class="actionsPane" data-dojo-attach-point="actionsPaneDiv" style="padding-bottom: 8px;">
      <div class="actionList" data-dojo-attach-point="actionsListDiv">
      </div>
    </div>
  </div>
  <div data-dojo-attach-point="popupContent" data-dojo-type="dijit/layout/ContentPane"
    data-dojo-props="region:'center', style:'margin-top: 22px;'"></div>
</div>

View solution in original post

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus

Rod,

   I don't think I want to do this permanently so here is the change you can make for your end. Replace the Widget.html content with this:

<div style="width: 100%;height:100%;">
  <div data-dojo-attach-point="header" class="popupheader">
    <div data-dojo-attach-point="instructions" style="width:100%;">${nls.selectfeatures}</div>
    <div data-dojo-attach-point="pager" style="display:none;">
      <div data-dojo-attach-point="featureCount" style="float:left;cursor:default;"></div>
      <a class="clear" href="#" data-dojo-attach-point="btnClear" title="${nls.cleartip}">${nls.clear}</a>
      <div class="titleButton next" title="${nls.next}" data-dojo-attach-point="next"></div>
      <div class="titleButton prev hidden" title="${nls.previous}" data-dojo-attach-point="previous" ></div>
    </div>
  </div>
  <div class="esriPopup esriViewPopup" style="width: 100%;">
    <div class="actionsPane" data-dojo-attach-point="actionsPaneDiv" style="padding-bottom: 8px;">
      <div class="actionList" data-dojo-attach-point="actionsListDiv">
      </div>
    </div>
  </div>
  <div data-dojo-attach-point="popupContent" data-dojo-type="dijit/layout/ContentPane"
    data-dojo-props="region:'center', style:'margin-top: 22px;'"></div>
</div>
0 Kudos
RodWoodfordOld
Occasional Contributor III

Hi Robert,

Thanks for the prompt reply. That works nicely. Having the zoom to at the top just makes it that little bit easier for our web clients to use. I will add this to future upgrades.

cheers

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Rod,

  In version 2.6 (now released) this is now a configuration option.

0 Kudos