Enhanced Coordinate widget

8505
16
02-20-2015 10:31 AM
Labels (1)

Enhanced Coordinate widget

Hey everybody,

Brandon Keinath‌ asked if it would be possible to display the current scale of your map within the widget in this thread. I took the challenge and added it to the ESRI coordinate widget. Just in case anybody else finds this useful!

Let me know if there is anything else that might make sense to add and I see what I can do.

In the future I'll probably clean up the code a little bit.

Tim

Labels (1)
Attachments
Comments

Nice work

But I have a question. How is it possible to display space instead of comma (the thousand separator) in the current scale number? For example instead of "1 : 2,000" I would like to see the scale number as "1 : 2 000" 

Ramon

Ramon Reimets,

this should work for you: Dropbox - Coordinate.zip

Tim

Thank You Tim, this is what I was looking for

Ramon

Tim,

This widget seems really helpful. Unfortunately, though, I can't get it to work. I downloaded the folder and replaced the current "Coordinate" folder in arcgis-web-appbuilder-1.1\client\stemapp\widgets with your folder, but when I loaded Web AppBuilder, nothing had changed. I restarted the builder several times to make sure it had restarted but it still didn't show up. It just look like normal.

Do you know what could be the issue?

Andrew Wallick

Try the following and see if that works. Create a Web App and then go to the following folder

arcgis-web-appbuilder-1.1\server\apps\Here the number of your Web App\widgets

And replace the Coordinate folder with my folder and see if it works.

Tim

Thank you, that worked! Do you know why it would work there but not in the Builder?

Tim,

Thanks for making this widget! There's one thing that I've noticed when I use it and not sure if it's just me or how to fix it... Above where the scale displays - I think it's supposed to show the coordinates for where your mouse is - but it just says 'loading...' and never changes. I am using a state plane coordinate system. Any advice?

Thanks again, I appreciate any help.

Courtney Barbee​ do you use a State Plane basemap?

Yes I am using a State Plane basemap

What version of WebApp builder are you using and what is the WKID of your basemap?

I tried to reproduce the issue but I couldn't.

I'm on version 1.2 and the WKID is 2277. Thanks for looking into it

Does the ESRI widget without my modification work for you?

I tried a State Plane basemap and I can't reproduce the issue.

See pic

When you open up the developer window in chrome does it give you any errors?

coord.png

The ESRI widget does work.

I think I just figured out what it was because now it is working... I went into the configure window and it had my correct State Plane showing, but when I actually clicked edit the WKID,  the number it showed wasn't right which is a bit strange. See below.

From here I just put in the correct WKID and it is working now. I actually never went in to edit/look at the WKID before since the Output Coordinate system displaying was the right one. A pretty easy fix! Thanks so much for taking the time to help me out.. I appreciate it

I never went into the config either until you had the problem. Glad I could help!

Hi Tim Witt‌.  Should this work well when more than one coordinate system is added to the widget?  I have added it to a Developer 2.5 app and it loads without any problems.  Noticing that ESRI has changed the CSS and images between versions 1.x and 2.5, I have updated your CSS to match the current default WAB 2.5 Coordinate CSS, etc. I can also get that to update without problem.

In the first image you can see what that looks like when the widget is not in use.  That looks good.  The second image shows how the widget area expands when I hover over the up arrow in the lower right corner.  Again, that looks good.  The problem is as soon as I move the mouse to actually select GCS_WGS_1984, the widget collapses and I can't select anything.   Even if I slowly move the mouse to the far right (second image) and move up at the up arrow, the widget still collapses.

Are you aware of any issues like this or do you have an idea of what changes I can make to get it to work?

Regarding the CSS updates - the only values I've changed are .jimu-widget-coordinate .coordinate-background and .jimu-widget-coordinate .coordinate-info font size from 11 to 14.

-Adam

This is a very helpful widget.However, if you can modify the widget to accept the PRJ file (i.e. Well Known Text WKTX) beside WKID as an optional in the widget configuration.

Version history
Last update:
‎02-20-2015 10:31 AM
Updated by:
Contributors