Coordinate + Scale widget for WAB Dev 1.3

7436
21
01-27-2016 11:40 AM
Labels (1)
BarnabyRockwell
Occasional Contributor III

Back in February 2015, Tim Witt released a modified Coordinate widget that also shows current map scale.  I took the scale-related elements of that widget and added them to the Esri Coordinate widget released with WAB Developer Edition 1.3.

Here's a screenshot of the widget working in an app made using WAB Dev 1.3:

Untitled.jpg

To install, unzip and place "Coordinate" folder in the widget folder of your WAB Dev 1.3 app after deleting the stock Esri Coordinate widget:

WABdev_1.3\server\apps\#\widgets

I strongly recommend that you DO NOT replace the stock Esri Coordinate widget in the base widget folder (\WABdev_1.3\client\stemapp\widgets), as doing so will greatly complicate general app handling (e.g. duplicating, creating) and the importing of apps from WAB Dev 1.2.

Update April 1, 2016:  Initial testing suggests that this widget works in WAB Dev 2.0.

Update July 19, 2016:  Initial testing suggests that this widget works in WAB Dev 2.1.

21 Replies
ThomasSpindler1
New Contributor III

I am using the Tab Theme.  Your app has same behavior in my browsers.  In Chrome, it looks like your screen shot above.  However, in IE 11:

0 Kudos
BarnabyRockwell
Occasional Contributor III

Yes, same for me in IE 11.

0 Kudos
ThomasSpindler1
New Contributor III

The Foldable theme gives me the same outcome as the Tab theme.  Are you still installing it the same way?   In the server/apps/#/widgets folder?

0 Kudos
BarnabyRockwell
Occasional Contributor III

Which outcome?  The coords/scale overlying the ruler?  Yes, the widget is installed as per first post.

0 Kudos
ThomasSpindler1
New Contributor III

Yes, when using Web AppBuilder 2.0 and Foldable theme.  Here is a test app:  ArcGIS Web App

0 Kudos
BarnabyRockwell
Occasional Contributor III

I've never seen that behavior and can't duplicate it.  You could try removing/re-adding the widget and playing around with the scalebar widget also.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Thomas,

  The fix is simple (not sure how this got messed up though) in the apps config.json you currently have:

{

  "uri": "widgets/Coordinate/Widget",

  "position": {

  "left": 7,

  "bottom": 5,

  "relativeTo": "map"

  },

  "version": "2.0.1",

  "id": "widgets_Coordinate_Widget_4",

  "keepConfigAfterMapSwithched": false,

  "name": "Coordinate",

  "label": "Coordinate"

  },

Change it to:

{

  "uri": "widgets/Coordinate/Widget",

  "position": {

  "left": 200,

  "bottom": 5,

  "relativeTo": "map"

  },

  "version": "2.0.1",

  "id": "widgets_Coordinate_Widget_4",

  "keepConfigAfterMapSwithched": false,

  "name": "Coordinate",

  "label": "Coordinate"

  },

0 Kudos
BarnabyRockwell
Occasional Contributor III

Thank you, Robert!  The "left" is 200 in all my apps, which I presume is the default, and I never changed that setting, or anything else in the app's config.json, for that matter.

{
"uri": "widgets/Coordinate/Widget",
"position": {
"left": 200,
"bottom": 20,
"relativeTo": "map"
},
"id": "widgets_Coordinate_Widget_4",
"positionRelativeTo": "map",
"name": "Coordinate",
"label": "Coordinate",
"version": "2.0.1",
"keepConfigAfterMapSwithched": false
},

Note that I imported the app (including Coordinate widget) from WD 1.3, and thus didn't create it from scratch in WD 2.0.

Cheers,

Barnaby

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Barnaby,

  I guess I have been misreading this conversation. I thought Thomas was the once having the overlap issue and providing the link to the site showing the issue?

0 Kudos
BarnabyRockwell
Occasional Contributor III

Robert,

You are correct.  I just checked my config.json to see if my values matched yours.  I mentioned the importing as perhaps Thomas' config.json got messed up if he created a new app from scratch in 2.0.

Cheers,

Barnaby

0 Kudos