Is it possible to show a web appbuilder application as a Image?

2378
23
10-11-2017 10:10 PM
Naveen_KumarKairamkonda
Occasional Contributor

Hi,

I have one web appbuilder application.

URL: http://machinename:3344/webappbuilder/apps/#/?parameter1=ObjID#&parameter2="export"

when parameter2 == "export" in the URL, then the application should load and should show in an image format like .png format.

I have some graphics (polygon features) on the map. Image should show map including the graphics. URL might ends with URL/xxxx.png.

Any suggestion is helpful.

Thanks in advance.

Regards,

Naveen. 

0 Kudos
23 Replies
RobertScheitlin__GISP
MVP Emeritus

Naveen,

  I have made several change to your code. Your issue with using the sample server 6 url was all the white space you had in front of "       http......." in the url.

0 Kudos
Naveen_KumarKairamkonda
Occasional Contributor

Robert,
MapExport Widget(you have shared code with some changes) is executing when we open the widget(onOpen) that means after the page load, but our requirement is Application should convert into an image on load of the page.


Requirement:
Application URL has 2 parameters (https://machinename:3344/Webappbuilder/apps/#/?obectjID=100&isenable=export)
1) Getting objectID from the URL [code written in index.html].
2) Querying the feature including graphics of that objectID from the dB [code written in MapManager.js].
3) if isenable parameter is "export" in the application URL then application should convert into an image on loading of the page.

**these all steps should happen while the page is loading and the final url should look like an image(ex .png format).
Till step 2 everything is working fine and we have to look at the 3rd step.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

I wonder if any of the "screenshot" widgets will work.  ??  There have been a few version, but not specifically say they work for 2.x.  You can find links to most in the Display, printing and output section of /blogs/myAlaskaGIS/2017/03/04/web-appbuilder-the-custom-widgets-list-332017       Although, Robert is usually spot on with code suggestions.

0 Kudos