SVG Dynamical Cartographic Application

Annie Danzart, Jean-Claude Moissinac, Christine Potier
Ecole Nationale Supérieure des Télécommunications

This paper treats the development of dynamical applications in cartography on the Internet using free software tools : SVG, MySQL, PHP, JavaScript.

The first part presents a specific cartographic application making it possible to visualize information on population density in France.
After thorough analysis of the mechanisms involved in this application, we were able to create an automatic generator of such applications, presented briefly in part two.

Part I: A Specific Cartographic Application

The needed features of the application are: To obtain these functionalities, a MySQL database is used to store the cartographic data (contours of the different elements, layout of geographical elements, etc) as well as the specific information to be displayed.

To display the specific information chosen in a form, we build dynamic SQL queries. These queries return the corresponding graphical layouts. While querying the database, we compute, "on the fly" a SVG map using PHP scripts. The display of textual information and changes of graphical features on mouseover is provided by using JavaScript functions.

The main characteristic of this application is the database structure we have chosen.
It is adapted to the hierarchical structure of the displayed information:

Country > Provinces > Departments > Cities.

This choice made it relatively easy to develop the cartographical zooming properties of the application. At every level of zoom, the application conforms to a hierarchical level: the available (and displayed) information is adapted to the hierachical level that is reached.

Part II: Automatic Generator of Cartographic Applications

The experience gained in the development of some variants of this application led us to work on the generalization of this cartographic approach.
Our objective is to develop a Java application for the automatic generation of similar applications.

The generator works in 4 steps :
  1. The initial Java interface allows the user to describe the database (defining the specific and cartographic data to be used and providing its hierarchical structure).
  2. The user then specifies the queries that will be proposed in the future application interface.
  3. The generator uses all this information to create an XML file which contains all the information necessary to create the application.
  4. And finally, the generator uses the XML file to create the PHP scripts and the JavaScript functions that will constitute the final cartographic application.

Web sites: