HomeHomeDatacrossing DSSDatacrossing DSSThe GRIDThe GRIDApplicationApplicationDocumentationDocumentation
PATH: » Documentation » mscross ITA  ENG  FRA  
 
Staff Publications Bibliography History msCross Links Google Map FAQ
 

msCross: AJAX (WEB 2.0) WEB GIS Client

msCross is a AJAX (WEB 2.0) WEB GIS client, initially developed to be a Javascript interface for UMN Mapserver.
msCross was developed to allow users dinamically display geographical information layers on the web. It was developed to be cross-browser. The main objective is to permit users to simply create Google Maps-style applications, using only Free Software.
The SourceForge project can be viewed on the web site: http://sourceforge.net/projects/mscross

Important:
If you are interested in developing msCross, write to datacrossing@crs4.it

The msCross has been tested with the following web browsers:
  1. Mozilla Firefox >= 1.0.5
  2. Internet Exploer >= 6.0
  3. Opera >= 8.51
Features:
  1. Free Software, distributed under GPL (Open Source)
  2. Client side
  3. Cross-browser / cross-platform
  4. Simple use (only one javascript file, no installation is required)
  5. Easily customizable and extensible
  6. Based on AJAX (Asynchronous JavaScript and XML) technique
  7. UMN Mapserver CGI interface support
  8. Point Overlay support
  9. OGC WFS client support (Web Feature Service, Open Geospatial Consortium: pdf) for point layers
  10. new OGC WMS client support (Web Map Service, Open Geospatial Consortium: pdf)
  11. new Easy Toolbar customization
  12. new Debugging mode
Screenshot 1
Here is possible to try it.


Screenshot 2
Point Overlay example (WFS)


Screenshot 3
Simulations analyzer


Screenshot 4
OGC WMS protocol

Download

  1. mscross.js v1.1.9 (date: 20070218)
  2. mscross.js v1.1.8 (date: 20061012)
  3. mscross.js v1.1.7 (date: 20061007)
  4. mscross.js v1.1.6 (date: 20060830)
  5. mscross.js v1.1.5 (date: 20060706)
  6. mscross.js v1.1.4 (date: 20060628)
  7. mscross.js v1.1.2 (date: 20060502)
  8. mscross.js v1.0 (date: 20060207)
  1. Standard Icons (date:20060905)

Example 1 (Main + reference map)

Here, an easy example to work out the msCross interface:
<html>
  <head>
   <title>msCross Sample Test</title>
   <script src="mscross.js" type="text/javascript"></script>
  </head>
  <body>

   <div style="width: 460px; height: 400px;" id="map_tag"></div>
   <div style="width: 190px; height: 400px;" id="ref_tag"></div>

   <script type="text/javascript">
     //<![CDATA[
     myMap1 = new msMap( document.getElementById('map_tag') );
     myMap1.setCgi( '/cgi-bin/mapserv' );
     myMap1.setFullExtent( Xmin, Xmax, Ymin );
     myMap1.setMapFile( '/home/user/map_files/mymapfile.map' );
     myMap1.setLayers( 'layer1 layer2 layer3' );

     myMap2 = new msMap( document.getElementById('ref_tag') );
     myMap2.setCgi( '/cgi-bin/mapserv' );
     myMap2.setActionNone();
     myMap2.setFullExtent( Xmin, Xmax, Ymin );
     myMap2.setMapFile( '/home/user/map_files/mymapfile.map' );
     myMap2.setLayers( 'layer4 layer5' );

     myMap1.setReferenceMap(myMap2);
     myMap1.redraw(); myMap2.redraw();
     //]]>
   </script>
  </body>
</html>
In red color users must input their own settings.

Example 2 (Map + WFS Point Overlay Layer)

<html>
  <head>
   <title>msCross Sample Test</title>
   <script src="mscross.js" type="text/javascript"></script>
  </head>
  <body>

   <div style="width: 460px; height: 400px;" id="map_tag"></div>
   <script type="text/javascript">
     //<![CDATA[
     myMap1 = new msMap( document.getElementById('map_tag') );
     myMap1.setCgi( '/cgi-bin/mapserv' );
     myMap1.setFullExtent( Xmin, Xmax, Ymin );
     myMap1.setMapFile( '/home/user/map_files/mymapfile.map' );
     myMap1.setLayers( 'layer1 layer2 layer3' );
     myMap1.setBorder(50);

     a = 'http://www.google.com/mapfiles/markerG.png';
     b = 'http://www.google.com/mapfiles/shadow50.png';
     myIcon = new msIcon(a, b, 1, 2);
     mySkin = null;

     myMap1.loadPointsOverlayWFS('http://wms_server.com/wms', 'layer4 layer5', myIcon, mySkin);
     myMap1.redraw();
     //]]>
   </script>
  </body>
</html>
In red color users must input their own settings.

Description of the API interface (incomplete)

Instance the msMap object

var myMap = new msMap(DivTag [, ControlType]);

ControlType: is a costant string that define toolbar position
  - standard, standardRight
  - standardLeft
  - standardUp
  - standardCornerLeft
  - standardCornerRigh

Set the MapServer CGI path

msMap.setCgi(url);

Set the MapServer MapFile

msMap.setMapFile(path);

Set the extent of the map

msMap.setFullExtent(Xmin, Xmax, Ymin);

Chose the layers list to be visualised

msMap.setLayers(string);

Set the size of hidden buffer around the map (in pixel, invisible zone)

msMap.setBorder(integer);

Load a point layer overlay via WFS protocol (the data are in GML (XML) format). Insieme ai dati geografici vengono anche scambiati gli attributi alfanumerici, visualizzabili tramite click del mouse sul punto

msMap.loadPointsOverlayWFS(server url, layers, msIcon, msInfoSkin);

Set borders of the map in pixel (no visible zone)

msMap.setBorder(integer);

xxx

msMap.setActionZoombox()

xxx

msMap.setActionPan()

xxx

xxx msMap.setActionZoomIn()

xxx

xxx msMap.setActionZoomOut()

To disable the Toolbar

msMap.setActionNone();

To redraw the map

msMap.redraw();

To set the function mode

msMap.setMode(Mode);

Mode: Mapserver "mode" parameter
  - map
  - legend

To set a reference map(the box has the same extent of your map)

msMap.setReferenceMap(msMap);

To link two objects in the msMap

msMap.attachMap(msMap);

To change the icons in the Toolbar

msMap.setIcon(id, url);

To set additional parameters in the CGI MapServer

msMap.setArgs(string);

Set image format in WMS protocol

msMap.setWmsImageFormat(string);

Set the Spatial Reference System (projection) for WMS requests

msMap.setWmsProjection(string);

Activate debug mode, click to Degub link to get requested url

msMap.debug();

Relating projects

  1. WMS-MAP
  2. quickWMS
  3. ka-Map
Valid CSSValid HTML 4.01 TransitionalPHP PoweredMapServer Powered CRS4, 09010 PULA (CA - Italy) email: datacrossing@crs4.it