2

I have created a new widget and called it "MagnifyingGlass" (at the request of the client). I have copied from the WAB (Web App Builder) the Sample Widget (the SimpleWidget folder structure for the 'Get Map Id' widget example).

  1. I have renamed everything.
  2. I have added it to the site config file so that it shows up.
  3. It is now a visible button on one of my dev maps.
  4. It is the duplicate BOOKMARK widget button to the right of the buttons on the bottom left.
  5. If you hover over it is says 'Zoom.'

The problem is what happens when you click it! It opens a window / popup...

The desired functionality is simply to activate this javascript command "this.map.enableRubberBandZoom();" and nothing more.

The whole goal for this widget is to simply add a button that users can click that lets them THEN click and drag to draw a Zoom window.

Apparently, this is functionality that SHOULD be (obviously) on all maps. SO... In my Widget.js file (remember I copied the Simple Widget example files) I have commented out the templateString, rewrote _getMapID to now be _init simply because I don't know what I'm doing (and I'm not sure where to look).

The whole goal is the Rubber Ban Zoom Box creation after clicking the Widget button. Period. But I am uncertain where and how, in the Widget.js file, to make this happen.

I have asked this on ESRI's GeoNet site already: https://geonet.esri.com/message/438305

closed as unclear what you're asking by Devdatta Tengshe, nmtoken, whyzar, user2856, BERA Mar 14 '18 at 10:27

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Can you please edit you post and add what technology you are referring to? I have a feeling its the ESRI javasecript API but not sure. Also more tags would help – Dowlers Nov 14 '14 at 22:45
  • @Dowlers The widget came from Web AppBuilder for ArcGIS so I just added tag arcgis-web-appbuilder to the question. – PolyGeo Nov 14 '14 at 22:58