Roberts Custom WAB Widgets

282130
475
12-31-2014 11:28 AM
RobertScheitlin__GISP
MVP Emeritus
475 Replies
RayJimenez
New Contributor II

Robert,

Thanks for getting back with me so quickly.

1. That sounds like you are planning on supporting related tables if so that is awesome.

2. Our users want results to look different so they can tell what search is what on the map. For an example they can search lease data for one company and then do another search for a different company and they can tell which leases belong to which. The work around I have added was to create a random color generator so every time they click on search it generates a color. I would like it if the user was able to change the color after the search was complete and the results were on the operational layers like how it is on ArcGIS Online map or maybe have the user select a color before they click search.

3. I am not really sure how “By Spatial” works. What I have tested is whatever layer I have chosen it does a spatial query on that. What I would like to do is once I do an attribute search on a layer it looks at that info to do a spatial search for other data. For an example I have a layer that have lease polygons and I search for a particular company, once I click search the results shows the leases for that company and wells that are inside those polygons.

Thanks,

Ray Jimenez

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Ray,

1. Yes relates are in the plans.

Our users want results to look different so they can tell what search is what on the map. For an example they can search lease data for one company and then do another search for a different company and they can tell which leases belong to which. The work around I have added was to create a random color generator so every time they click on search it generates a color. I would like it if the user was able to change the color after the search was complete and the results were on the operational layers like how it is on ArcGIS Online map or maybe have the user select a color before they click search.

2. This still has me a little confused as the eSearch clears the last search when you run the next one so how does randomly changing the color help?

I am not really sure how “By Spatial” works. What I have tested  is whatever layer I have chosen it does a spatial query on that. What I would like to do is once I do an attribute search on a layer it looks at that info to do a spatial search for other data. For an example I have a layer that have lease polygons and I search for a particular company, once I click search the results shows the leases for that company and wells that are inside those polygons.

3. You should look at the help doc: Web AppBuilder for ArcGIS | Help - Enhanced Search widget | Spatial Search

0 Kudos
RayJimenez
New Contributor II

Robert,

1. Awesome

2. I had to turn that functionality off. I also had to turn off the functionality to add or remove from current results. The Search can only Create new results and does not remove results unless you clear results. That will clear all the different search you have done but our users really wanted to see multiple results.

3. I looked at the help and man what you have done with this widget is just awesome. I see my problem that I am having. Since I can have multiple search results this tool will use the last results it generates. I think I am going to have to think of a work around.

4. I have not had a chance to look at your new update but in the previous releases if I put a date to search it was mandatory that the user entered a date. Is there any way that I can set it to be like the other types of searches where if the user leaves it blank the search just does not add it to the AND in the where clause.

5. Also is there a way for users to copy and paste a list from excel in the text box where the search expression has an IN.

Thanks,

Ray Jimenez

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Ray,

3. Yep that is something you will have to figure out.

4. In the 2.1 release I have made it where you can clear/delete the date in the date picker box and then it will act like other search parameter values and not be used.

5. I am not sure but I think you should be able to do this now.

0 Kudos
RayJimenez
New Contributor II

Thank you. I will let you know if I can figure it out.

Ray Jimenez

0 Kudos
SerjStolyarov1
New Contributor III

The Identify Widget is an ideal solution for my customer. They have around 60 layers, many of which could be underneath eachother. Current out of the box identify gives a pop-up through which you have to click to change layer... This is really tedious.

Thank you so much for making this widget! Esri should take note and develop this functionality!

BarnabyRockwell
Occasional Contributor III

Esri should take note and develop this functionality!

YES!!!!!!!!!!!!!!!  This is even more important when it is considered that, without Robert's awesome and essential ID widget, WAB (and Flex) have no way to ID features on thematic raster layers.  The old .NET viewers from Arc Server 10 did have this capability built in, but esri removed it for some unknown reason. 

SerjStolyarov1
New Contributor III

I have initiated an Idea in regards to the Identify Widget, if anyone is interested they should upvote it.

https://community.esri.com/ideas/12372

0 Kudos
AnthonyKeogh1
New Contributor III

Robert Scheitlin, GISP

Hi Robert, I found a post here where a person was asking about client side printing and you mentioned that you had done some work on getting a client side print working using the JS api so I was wondering if you ever created a widget for client side printing?
I have also found this arcgis thumbnail builder on GitHub but I'm just trying to figure out if that map to canvas script is the only way to do it using the 3.x JS APIs.

Thanks for any info you might have!

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Anthony,

  I did not develop a specific widget for clientside printing I just added code to custom widget that use this technique:

Currently I use the PrintTask to print a JPG of the map and then use that JPG in the report that I am generating clientside

A code snippet:

var printTask = new PrintTask('..../ExportWebMap/GPServer/Export_Web_Map');

        var template = new PrintTemplate();

        this.imgHeight = (740/oWid) * oHgt;

        template.exportOptions = {

          width: 1542,

          height: (1542/oWid) * oHgt,

          dpi: 200

        };

        template.format = "jpg";

        template.layout = "MAP_ONLY";

        template.preserveScale = false;

        template.showAttribution = false;

        var params = new PrintParameters();

        params.map = this.map;

        params.template = template;

        printTask.execute(params, lang.hitch(this, this.printResult));

printResult: function(rsltURL){

        var mapImg = domConstruct.toDom('<img src="'+rsltURL.url+'" border="0" style="width:740px;height:'+this.imgHeight+'px;"/>');

        domConstruct.place(mapImg, dom.byId('mapImgDiv'), 'replace');

      },

0 Kudos