SWF viewer: Difference between revisions
Brian Wilson (talk | contribs) mNo edit summary |
Brian Wilson (talk | contribs) mNo edit summary |
||
Line 10: | Line 10: | ||
Once I had the php module installed correctly I created this | Once I had the php module installed correctly I created this | ||
[http://mapserver.wildsong.biz/simple.php simple SWF example] as a test. | [http://mapserver.wildsong.biz/simple.php simple SWF example] as a test. | ||
(Here is the source code: [http://mapserver.wildsong.biz/simple. | (Here is the source code: [http://mapserver.wildsong.biz/simple.phtmls 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 | With that under my belt I went ahead and rebuilt the mapserver with the added command line option to 'configure': --with-ming |
Revision as of 00:56, 29 October 2005
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.