Ka-map learning-1. installation and testing

Source: Internet
Author: User
References: http://ka-map.ominiverdi.org/wiki/index.php
I. Environment preparation
Need to install Web Server (APACHE), PHP, Application Server (mapserv) and mapserv programming library API--PHP/mapscript, each part of the module can be compiled and installed by their own source code (if it is Linux/Unix ), you can also use the package for installation, such as ms4w in win And FGS in Linux (foss gis suite ).
    • Apache (Web Server)
    • Mapserver
    • PHP
    • Mapscript

Ii. Download ka-Map
Go to the Ka-map official website to download version 1.0, address: http://ka-map.maptools.org
The directory structure of Ka-map is as follows:

 
.../Kamap-1.0/
.../Kamap-1.0/docs/
.../Kamap-1.0/htdocs/
.../Kamap-1.0/htdocs/images/
.../Kamap-1.0/include/
Note: I copy the entire/Ka-MAP/directory to/apache2/htdocs.
Iii. Related Configuration
.../Ka-MAP/include/config. Dist. php is renamed as.../Ka-MAP/include/config. php
Configure the config. php file:
1,Setting up library pointers

Ka-map requires both PHP mapscript and the GD module for PHP. config. php needs to point to these library files (around line 23 ):
$ Szphpmapscriptmodule = 'php _ mapscript. '. php_shlib_suffix;

Or:

$ Szphpmapscriptmodule = 'php _ mapscript_46. '. php_shlib_suffix;

 
Note: The file name setting here must be the same as the file name of the library you configured and installed. In addition, do not add the suffix marker. (I only changed php_mapscript_46 to php_mapscript. The php_gd library file is not found)
2. add your own mapfile File
Modify the definition location of the variable $ aszmapfiles in the file:
$ Aszgmap = array (
'Title' => 'shape-test ',
'Path' => 'HTTP: // www.cnblogs.com/shape_label.map' ,//my mapfile
'Scales' => array (30000000,250, 150000)
'Format' => 'png'
);
$ Aszmapfiles = array ('gmap' => $ aszgmap );
Iv. Test
Enter http: // localhost/Ka-MAP/htdocs/in the browser to display the map normally, supports basic functions such as translation, multi-level Scaling, coordinate display, legend, scale, rubber zoom, and center positioning.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.