This project is read-only.

Project Descritption

Javascript framework for publishing maps. Maps can consists of WMS and Tiling services. Easy navigation for all browsers (desktop and mobile browsers)

See some examples: xMap Examples, try the "Advanced OSM" example also on your mobile phone or table...

Here is a simpe code example for creating a simpe Yahoo Street map

 

<html>        
   <head>
      <!-- Use this for mobile web apps -->
      <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
      <!-- 
      Append css (jquery-ui.css)
       Append js (jquery, xMap.min.js) ... see release example
      -->  
      <script type="text/javascript">  
        var map;
        $(document).ready(function () {
            // Init xMap
            xMap.Init();
            // Create a simple tile service config "config" = Extent & Scale levels 
            var config = new xMap.Globals.WebMercatorTileConfig(19);
            var scales=[];
            for(var i=0;i<config.scales.length;i++)
              scales.push(config.scales[i][1]);
              
            // Create Map & append it to html element, set extent and/or set scale
            map = new xMap.Map(document.getElementById('map'), 'EPSG:900913', scales);
            map.SetExtent(new xMap.Geometry.Bounds(config.extent));
            map.SetScale(scales[3]);
            
            // Add a tile service to the map (e.g a prepared Yahoo Serverice, ... see the release example)
            map.AddService(new xMap.YahooStreetTileService());
            
            // At this position you can append map tools etc (Zoom)
            map.AddTools([new xMap.Tools.Navigate(null)]);
            
            map.Refresh();
        });
      </script>      
    <head>
    <body>
       <div id="map" style="position:absolute;left:0px;right:0px;top:0px;bottom:0px">
       </div>
    </body>
</html>

 

A more accurate description and Documentation comming soon!

Last edited Jul 13, 2012 at 4:31 PM by gisdev1, version 17