Coordinate + Scale widget for WAB Dev 1.3

5794
21
01-27-2016 11:40 AM
Labels (1)
BarnabyRockwell
Regular Contributor

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
RebeccaStrauch__GISP
MVP Esteemed Contributor
0 Kudos
KarmielVardit
New Contributor

Thanks for the widget! I have a problem that the current map scale is switch.

For example, 50,000:1 instead of 1:50,000. My application is in Hebrew but I didn’t do any changes in the widget. Do you have any idea what can I do for fix it? It will be very helpful.

Thank you very match.   

לכידה.JPG

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Karmiel,

  Hebrew is a right to Left language so is that not the correct way for it to display? The WAB does RTL changes on its own based on language used.

0 Kudos
KarmielVardit
New Contributor

Indeed, the letters we write from right to left but numbers and international expressions we write from left to right. So there is no way to change this as long as my application in Hebrew? Maybe there is a few lines in the code that you can direct me to change to force the change of it?

Sorry if I bother you…

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Karmiel,

  No bother at all. Here is the simplest way in the Widget.html find the scaleInfo div and add the style rule to force ltr instead of rtl:

<div data-dojo-attach-point="scaleInfo" style="direction:ltr">

  Your scale

  </div>

0 Kudos
KarmielVardit
New Contributor

It worked!!! Thank you very much!!

0 Kudos
BarnabyRockwell
Regular Contributor

What would we do without Robert? 

ThomasSpindler1
New Contributor III

Hello Barnaby,

Love this widget, was using it in 1.3 without issue.  However, in 2.0, the ruler and the coordinates/scale are being placed on top of one another.  Is this correctable?  I also posted below, the differences I noticed between browsers in 1.3.  Thanks for the work you do!

2.0

1.3

0 Kudos
BarnabyRockwell
Regular Contributor

Hi Tom,

In my WD 2.0 apps, the coords and scale are always just to the right of the scalebar ("ruler") in Chrome, IE 11, and Firefox, and look exactly the same as you show for WD 1.3.  Here is one of my WD 2.0 apps:

ArcGIS Web Application

I did not reconfigure anything. Which theme are you using?  I have only tested and used the widget in the Foldable theme.

Cheers,

Barnaby

0 Kudos