Troubleshooting

From Ka-Map Wiki

Jump to: navigation, search

much of the text of this page is from Tyler Mitchell article Build AJAX-Based Web Maps Using ka-Map.


Can't get ka-Map working? Here are some tips for improving your experience or finding problems with your setup.

  • Use a more recent web browser version. AJAX is highly dependent on recent web browser technology.
  • Check your web server aliases to make sure that the /ka-map/ directory points to the proper .../kamap-0.1.1/htdocs folder.
  • Test your map file by running shp2img. If you don't have this utility already, you should get it. If it doesn't work with your map file, then ka-Map won't either. shp2img also comes as part of the precompiled FWTools collection.
  • Check your temporary/cache folders. For simplicity, your map file IMAGEPATH and IMAGEURL should correspond to the $szBaseCacheDir setting in config.php. If no files are being made in that folder, then your settings are to blame. Ensure that the web server is allowed to write in that folder.
  • Turn on the debug option in config.php. Setting $bDebug = true will draw the rectangles of the tiles on top of your map data. If nothing appears, then you have a problem with the ka-Map installation.
  • Consider using a more recent version of ka-Map (e.g. using CVS). There are bug fixes, performance improvements, and new features in newer versions, but I have found 0.1.1 to be the most stable at present.
  • More recent versions of ka-Map come with a scripts folder, which the user that the web server runs as must be able to write into that folder.
  • If you are familiar with JavaScript, you could also install a debugger that can help you debug configuration problems. Consider using Mozilla's Venkman debugger.
  • If you are still having problems, you can try loading the init.php file in your URL to see more runtime settings and errors (e.g. http://localhost:8080/ka-map/init.php).

[edit] Problem: I load the ka-Map interface and no map loads

[edit] ka-Map often fails if

  1. you enter an invalid path to the map file in config.php
  2. you invalidate the php syntax in config.php when adding a new map file
  3. the map file you have just added has invalid syntax
  4. you use INCLUDE keywords in the map file

You can test these conditions by loading http://path-to-ka-map/init.php and seeing if you get any error messages. If you see a bunch of javascript code then your problem is likely elsewhere.

Another problem could be related to http://path-to-ka-map/tile.php . Look if it shows an colored image or nothing. Normally is due to the GD library path defined in config.php

Personal tools