QGIS server won't return JSON(P)

We set up a QGIS server and are using QGIS to connect to a WFS layer. Everything is working fine within the desktop application. Then we use qgis2leaf to generate a html/js web map. That all works fine, except when I use the WFS layer. For some reason I am getting the Unexpected token < error, as can be seen here (http://qgis.webmuni.com/export).

So basically what I think is happening is that the call that is made is (http://qgis.webmuni.com/qgis_mapserv.fcgi?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=zones2&SRSNAME=EPSG:4326&outputFormat=text/javascript&format_options=callback:processJSON) and it expects it to return JSON, but the server is returning XML.

I don't know why the server wont return JSON(P) and I am not sure if there is something I am doing wrong or if we need to configure the server in some way to enable JSON capabilities.

Thank you in advance for your help.
dougfosterNYCAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dougfosterNYCAuthor Commented:
Got it figured out:

qgis2leaf used outputFormat=text/javascript, which for some reason was returning XML, but changing that to outputFormat=GeoJSON worked for me with QGIS server.

Hopefully this helps someone.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
GIS/GPS Programming

From novice to tech pro — start learning today.