Professional Documents
Culture Documents
Introducción a Chameleon
Profesor: José Armando Ordóñez Córdoba
Introducción
Prerrequisitos
Conceptos
WMS es un estándar de la OGC que define un servicio que provee acceso a las
información geográfica sobre la Internet utilizando protocolos estándares.
• Script de inicialización
• Plantilla
• Mapfile
• Widget
Servicio accesible por Internet que puede interpretar una plantilla de aplicación
Chameleon y un contexto para crear una aplicación de mapeo Web interactiva.
Arquitectura
Instalación
Copiamos los directorios data, etc, y map del directorio de samples de Chameleon
(chameleon/samples/data, chameleon/samples/etc, chameleon/samples/map).
-- ms4w
-- apps
-- myApp
-- data
-- etc
-- htdocs
-- images
-- map
<?php
/*
* this is a sample of a minimal application script required to
* get a chameleon application running with a template and a
* local map file. Most applications should actually just
* copy this file and modify the template and mapfile
* parts and should not need to do a lot more here.
*/
include( "../../htdocs/chameleon.php" );
$szTemplate = "./sample_basic.html";
$szMapFile = "../map/chameleon.map";
<CWC2 TYPE="ErrorReport"
POPUPWIDTH="500"
POPUPHEIGHT="400"
TOOLBAR="false"
STATUS="false"
MENUBAR="false"
VISIBLE="false"
IMAGE="images/icon_error.png"
IMAGEWIDTH="18"
IMAGEHEIGHT="18"
IMAGETIP="Display Error Report"
LABEL="Error Report"/>
</form>
</body>
</html>
$szTemplate = "./template.html";
$szMapFile = "../map/chameleon.map";
$szTemplate = "template1.html";
$szMapFile = "../map/chameleon.map";
11. Configure el servidor Web, para lo cual se crea un alias en Apache y se guarda
como httpd_<app_name>.conf en /ms4w/httpd.d/ donde <app_name> el
nombre de la aplicación. En el archivo httpd_chameleon.conf en
C:\ms4w\httpd.d se agrega una entrada con el siguiente código:
Alias /chameleon/tutorial
"/ms4w/apps/chameleon/tutorial/htdocs"
<Directory "/ms4w/apps/chameleon/tutorial/htdocs">
AllowOverride None
Options Indexes FollowSymLinks Multiviews
Order allow,deny
Allow from all
</Directory>
</blockquote>
12. desde el browser ingresar a :
http://localhost/chameleon/tutorial/index.phtml
Creando nuestra aplicación
<td valign=top>
<CWC2 TYPE="ZoomIn"
VISIBLE="true"
IMAGETIP="Zoom Into Selected Point or Region"
TOOLSET="Navigation"
IMAGEWIDTH="24"
IMAGEHEIGHT="24">
<IMAGE STATE="normal"
IMAGE="buttons/button_zoomin_1.png"/>
<IMAGE STATE="hover"
IMAGE="buttons/button_zoomin_2.png"/>
<IMAGE STATE="selected" I
IMAGE="buttons/button_zoomin_3.png"/>
</CWC2>
<br>
<td valign=top>
<CWC2 TYPE="ZoomOut"
VISIBLE="true"
IMAGETIP="Zoom Away From Selected Point"
TOOLSET="Navigation"
IMAGEWIDTH="24"
IMAGEHEIGHT="24">
<IMAGE STATE="normal"
IMAGE="buttons/button_zoomout_1.png"/>
<IMAGE STATE="hover"
IMAGE="buttons/button_zoomout_2.png"/>
<IMAGE STATE="selected" I
IMAGE="buttons/button_zoomout_3.png"/>
</CWC2>
</td>
</tr>
</table>
<CWC2 TYPE="ErrorReport"
POPUPWIDTH="500"
POPUPHEIGHT="400"
TOOLBAR="false"
STATUS="false"
MENUBAR="false"
VISIBLE="false"
IMAGE="images/icon_error.png"
IMAGEWIDTH="18" IMAGEHEIGHT="18"
IMAGETIP="Display Error Report"
LABEL="Error Report"/>
</form>
</body>
</html>
<?php
/*
* this is a sample of a minimal application script required to
* get a chameleon application running with a template and a
* local map file. Most applications should actually just
* copy this file and modify the template and mapfile
* parts and should not need to do a lot more here.
*/
include( "../../htdocs/chameleon.php" );
$szTemplate = "template2.html";
$szMapFile = "../map/chameleon.map";