I license the engine to clients, but the WhirlyViz app is free and the best demonstration of the engine itself.
This example talks to a WMS server.
It's incredibly flexible and as long as it's not in the main rendering loop (good grief no!) still very fast. There are other advantages too.
Everything Speaks JSON
|SF Bay Area Bike Share|
For example, several public bike share companies provide JSON feeds with up-to-the-minute station availability. They have spatial data, but not as GeoJSON. That's kind of annoying, but now easily fixed.
- We fetch the appropriate feed in the script
- Parse the JSON return and iterate through the records
- Pull out location data and anything we might want to display
- Convert the data to GeoJSON and hand it back to WhirlyViz
WhirlyViz still knows nothing about the JSON feeds from the bike share companies, it's just displaying GeoJSON with some styling info. The script has all the smarts and, best of all, it wasn't all that much code.
Running Your Own Script
WhirlyViz has its own URL scheme for displaying data. Refer back to this post for details.
The script argument tells WhirlyViz we're running a script and the js argument tells it where to go get it. Of course, then you have to write one of these and the documentation is... lacking.
You can see some of the new examples in the latest WhirlyViz update. I'm now talking to two new geospatial data services which will get their own blog posts.
In the mean time, if you have a neat visualization you'd like to see on mobile, hit me up and we'll talk.