Url Button Widget Version 2.5 - 08/10/2017

165136
61
07-29-2016 09:27 AM
Labels (1)

Url Button Widget Version 2.5 - 08/10/2017

This is just a simple widget to open a URL. The url can be any valid URL Address. The difference between this and just adding a link in WAB, is that this is a button and not a text link. Some have asked for this ability, so here it is.

Live Preview Site

Previous Version

Labels (1)
Attachments
Comments

Hello Robert Scheitlin, GISP‌ and thank you for your answer.

I am using the default theme and I think I have discovered the "trick", if widgets are in the same "zone", they close one another when clicked. At first I didn't notice that in your demo there is another url button on the top right, close to legend and layers, and if I open the legend then click on the url button, the legend gets closed, while it stays open if I click on the two buttons under the search,

For now I have moved my button in a separate area, in this way other widgets stays open, but it would be good to have a "simple button" behavior on certain widgets, sometimes we need very simple buttons, like opening an url or clearing all the graphics on the map.

Do you have any idea on how to solve this problem? I have tried intercepting the onClick on the widget itself, but without any success.

Thank you again and best regards

Francesco

Hi Url Button Widget Version 2.5 - 08/10/2017 Robert Scheitlin, GISP,

I am trying to add this to one of our webapps, but have 0 experience with custom widgets (do have experience with adding and customizing out-of-the-box widgets). We are a nonprofit and don't have portal. Is is possible for us to use this widget? If so, how?

Thanks

CAFB,

   Custom widget can be used with Local on premise Portal or WAB Developer. They can not be used with AGOL's WAB apps.

Ah. Would I be able to build it in WAB Developer, and push it out to be used in the org's AGOL wep-app builder?

Nope

URL BUTTON to show Google Map 3D (re-use same browser tab)
----------------------------------------------------------
Modify config.json like this:
{
"LinkUrl": "http://www.esri.com",
"addCenterParameter" : true
}

Modify Widget.js like this:
../..snip../..
if(ll){
window.open("https://www.google.com.au/maps/@"+ll+",800a,35y,0h,0t/data=!3m1!1e3!5m2!1e3!1e4", "_Google3D");
} else ../..snip../.. 

I deployed URL Button with WAB Developer Edition 2.10.  I'm using this URL Button to link to a Help Doc PDF located in one of the file servers.  It been working fine when I deployed in 2019, using mainly Internet Explorer 11.  I just discovered recently that the URL Button wouldn't work in Chrome and the new Edge browser.  When I clicked on the button, it's not opening up another page, I had to use F12 to see the issue.  This is what I'm getting.  I tested URL Button in IE, it's still working fine.  I would like to know if anyone has the same issue and/or know how to resolve the issue?  Thank you!

Pei-SanTsai_0-1616541251138.png

 

@Pei-SanTsai ,

   Using file: urls has not been allowed in modern browsers like Chorme for years now. You need to create a Virtual Directory (if using IIS) so that you can have an actual URL (with http or https).

@RobertScheitlin__GISP ,

Thank you for replied my question.  I'm not using Http or https though, it's just a path to a file server (//servername/foldername/filename).  I'm using IIS, so I need to create virtual directory for this file server and place that URL in the URL button?

Correct. Modern browsers do not allow for UNC paths like //servername as this is a potential security issue.

@RobertScheitlin__GISP 

Thank you for the help.  I got it work.  

Version history
Revision #:
1 of 1
Last update:
‎07-29-2016 09:27 AM
Updated by: