Shapefiles in the print widget and the screening widget

1145
8
Jump to solution
04-21-2018 06:34 PM
Labels (1)
GilbertoMatos
Occasional Contributor II

Hello friends!

I have two problems, I can not find a solution. I had never worked with import of shapefiles (temporary). I was asked for this claim. I was able to customize the widget provided here in the geonet community. I made the customizations I needed and until then everything ok.

The problem is that I was asked to generate the pdf print with the print widget, the shapefiles legend should be included too (with symbology, texts, etc), but I can not find where to customize and how to do it .

My second problem is that the widget screening (in the drawing and coordinate tool) does not load the shapes layers for intersection of information and report generation. I have already tried to use the shapefile part of it, but I was not able to fix all the errors that were displayed, one of them being the fact that the layer widget did not display the imported shapefile in any way.

Thanks for any help and I apologize for English. I'm from Brazil and I need to use google translator.

Thank you!
Gilberto.
 

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Gilberto,

   Have you tried with the Add data widget?

View solution in original post

8 Replies
RobertScheitlin__GISP
MVP Emeritus

Gilberto,

   Have you tried with the Add data widget?

GilbertoMatos
Occasional Contributor II

Hello Robert!

I have not yet used this widget you mentioned. My problem is that the system version was made using WAB 2.2, including the screening widget I made some modifications to be able to work in my application. Actually these two problems are giving me a little headache. I'll try to test it to see if it meets my need. Thanks a lot for the help.

Hug,
Gilberto.

0 Kudos
GilbertoMatos
Occasional Contributor II

Hello rscheitlin, how are you?

I read about the Add Data widget in the WAB help. It would be useful for me, but I will need to customize it, because the request is to allow only "shapefile" and not "csv" and "kml".

The problem is that my application is in version 2.2 of WAB. I installed WAB 2.7 on my machine, and I created an application with only 3 layers, I added this widget, but whenever I add the shapefile .zip file, I get this message in the console and on the screen in a popup: "Generate Features error: Unable to determine hosted server's instance URL (no hosted server configured?) ".

I read something about it, but I did not quite understand why. Is there anything about the arcgis server configuration that I need to do? It is? Except that we are with version 10.3 of the arcgis server, and the help speaks in version 10.6. Is there anything I can do, or will we be forced to migrate to version 10.6?

Thank you!
Gilberto.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Gilberto,

  I seen where others have mentioned this error. I have never seen it and have no problem adding shapefiles. Are you sure you are adding all the required files to the zip? have you tried other shapefiles? do the shapefiles have a prj file?

GilbertoMatos
Occasional Contributor II

Hi Robert!

Yes, I have tried several. All ".zip" of shapefiles contains the minimum structure required. The shapefiles import widget I downloaded here from the geonet forum imports the shapes correctly, but there I have the initial problem of this discussion, which is to include in the impression the legend of the shapefile and the crossing of the information after the drawing with the screening widget.

Thank you!
Gilberto.

0 Kudos
GilbertoMatos
Occasional Contributor II

Robert Scheitlin, GISP‌,

I was able to make the Add Data Widget work. I had to modify the following lines in the file "widgets \ AddData \ Widget.js":

getSharingUrl: function()

{
          var p = "http://www.arcgis.com"; //portalUtils.getPortal(this.appConfig.portalUrl);
          return portalUrlUtils.getSharingUrl(p); //portalUrlUtils.getSharingUrl(p.portalUrl);
},

The commented code is the original widget. I needed to put the fixed url of the arcgis website, because I can not understand where to configure the "sharing / rest" url of my portal. With the esri address, the widget now imports the shapefiles in ".zip" format. The shapefiles layers appear correctly in the layer list widget, and you can turn the shapefile on and off on the map.

The problem is that even using the Add Data Widget you suggested, I'm still not able to show the layer in the map legend or the widget screening when crossing the information. Could you tell me if this behavior would be correct and if I have a bug? There is no error in the console, it just does not display the content.

Thanks again for the help.
Gilberto.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Gilberto,

   Strange when I use the Add Data widget it adds the shapefile to the legend. I don't use the screening widget so I am not sure about that.

0 Kudos
GilbertoMatos
Occasional Contributor II

Robert,

Well, I'm going to have to debug and try to find out why the shapefile layer does not appear in either the legend widget or the pdf file that the print widget generates (it shows the layer in pdf, but in the pdf caption it does not the symbology of this layer appears). The screening widget will have to check with the user how we will proceed. The user wants to add the shapefile, and to be able to check all the active layers that intersect with this shapefile, but this is not working either.

Thank you!
Gilberto.

0 Kudos