Message Boards Message Boards


Missing something in the code deployment?

Posted 9 years ago
1 Reply
0 Total Likes


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.


POSTED BY: Ulrich Arndt
Posted 9 years ago

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

CloudDeploy[ FormFunction[{{"x","Sprache eingeben:"}->"Language"}, 
    "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
or Discard

Group Abstract Group Abstract