SWF viewer

From Wildsong
Revision as of 00:42, 29 October 2005 by Brian Wilson (talk | contribs)
Jump to navigationJump to search

What does it take to build a simple SWF (Flash) based vector map viewer?

Well, Mapserver can generate SWF files directly, if you have compiled it with support for the ming library.

First I built ming as an extension for PHP. Current ming is 0.3beta1 and php is 4.4.0. Possibly this step is not needed but I'd like to be able to use SWF files directly from php anyway.

On my TSL 2.2 Linux system, I had to add the bison and libungif-devel rpm packages to get ming to compile. I had to install libungif on the target server.

Once I had the php module installed correctly I created this simple SWF example as a test. (Here is the source code: simple.php source)

With that under my belt I went ahead and rebuilt the mapserver with the added command line option to 'configure': --with-ming

Then I revamped my City of Corvallis simple example yet again to generate SWF output instead of png. Or rather, I will do that on Tuesday next week after I figure out why the compile of mapserver dies now! Botheration! Fuss fuss.

Links

I like the simple user interface on this server: http://www.downtownbethesda.com/

Layers turn on and off at different scales, there are basically no controls; just pan and zoom. Pan by dragging, and zoom with slider or scroll wheel.