[ka-Map-users] Configuring Ka-map to use different .map files

Paul Spencer pspencer at dmsolutions.ca
Thu May 26 11:31:03 EDT 2005


Robert,

does that map file work with the mapserver you installed in FGS?  You 
can create a simple little php script in your fgs/www/htdocs directory 
to test this:
itasca.php
<?php

dl( 'php_mapscript.so' ); //or whatever your version is
$oMap = ms_newMapObj( <path to itasca map file> );
$oImg = $oMap->draw();
$szURL = $oImg->saveWebImage();
echo "<img src=$szURL>";
?>

then load http://localhost:8080/itasca.php

if that loads an image of the itasca demo, then the problem is with 
ka-Map somewhere.  However, I suspect that your itasca map file has a 
problem around line 73 that prevents the FGS mapscript from loading it.

You can also try loading the init.php script directly to debug your problem

http://localhost:8080/ka-map/init.php

once that returns a bunch of javascript-like code with no errors, you 
should be good to go.

Note that the map file must be valid to work.

Cheers

Paul

Robert Aldridge wrote:
> First off, WOW!  I can envision Ka-map being an
> awesome base for developing applications.  Since I
> didn't want to mess with my current mapserver install,
> I went to maptools.org and installed fgs, gmap-demo,
> and the ka-map module.  Works like a charm!  I can
> browse to http://localhost:8080/ka-map/ and everything
> works great.
> 
> Now, I'd like to try it with some of my existing map
> files.  For instance, what would it take to get the
> itasca.map working in ka-map?  
> 
> I tried copying itasca folder to $FGS_HOME/apps (i.e.
> 'cp -r /var/www/itasca $FGS_HOME/apps/itasca'), and
> adding the itasca.map to the $aszMapFiles array in
> $FGS_HOME/apps/kamap-0.1.1/htdocs/config.php, but when
> I hit http://localhost:8080/itasca/, I get a
> JavaScript Application error window that states:
> 
> Warning:[MapServer Error]: getString(): Parsing error
> near (none):(line 73) in
> /home/myhome/fgs/apps/kamap-0.1.1/htdocs/init.php on
> line 44
> 
> Warning: Failed to open map file
> ../../itasca/itasca.map in
> /home/myhome/fgs/apps/kamap-0.1.1/htdocs/init.php on
> line 44
> 
> Fatal error: Call to a member function on a non-object
> in /home/myhome/fgs/apps/kamap-0.1.1/htdocs/init.php
> on line 62
> 
> Are there any instructions available yet on running
> ka-map with custom .map files?  Or, any input from
> some of you that have successfully done this?
> 
> Thanks,
> 
> Robert
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users
> 

-- 
+-----------------------------------------------------------------+
|Paul Spencer                           pspencer at dmsolutions.ca   |
+-----------------------------------------------------------------+
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+


More information about the ka-Map-users mailing list