Message Boards Message Boards

0
|
5663 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Missing something in the code deployment?

Posted 10 years ago

Hi,

I run the following code:

CloudDeploy[ FormFunction[{{"x","Sprache eingeben:"}->"Language"}, 
GeoRegionValuePlot[(Tooltip[#1,Column[{CommonName[#1],#1}]]->#2)&@@@(LanguageData[Interpreter["Language"][#x],"Speakers"])]& ] ]

It is based on an example and should create a map which visualize the number of people speaking a language which is entered in the FormFunction.

Unfortunately, the code is not working as expected. The result is code of the map. If I run this in the Wolfram Desktop I get the expected result. Why do I get the code an not the graphic?

Thanks in advance for any hints.

Ulrich

POSTED BY: Ulrich Arndt
Posted 10 years ago

Add a second argument to FormFunction to specify you want an image format:

CloudDeploy[ FormFunction[{{"x","Sprache eingeben:"}->"Language"}, 
    GeoRegionValuePlot[(Tooltip[#1,Column[{CommonName[#1],#1}]]->#2)&@@@(LanguageData[Interpreter["Language"][#x],"Speakers"])]&, 
    "PNG" ] ]

This is actually a bug, FormFunction is supposed to automatically convert Graphics and similar expressions automatically to images, but this will be equivalent to what FormFunction will do.

POSTED BY: Joel Klein
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract