simple shapefile load


Simple shapefile geometries load. Only .shp file is required.
<html>

  <body>
        <div id="map" style="position:relative;left:100px;width:400px;height:400px;"><div>
  </body>

  <script type="text/javascript" src="http://www.spacial.io/cad4web/lib/cad4web.js"><script>

  <script>
    var cad = new cad4web.ContextClass( 'map', { backgroundColor: [20, 20, 20, 1] });
    var file = 'http://www.spacial.io/cad4web/files/world_lr.shp;
    cad.clear();
    cad.addShp(file, [220, 220, 170 ], { polygonAsLineString: true } )
        .then (function () {
             cad.extent();
        }) ;
  </script>

</html>




//  map div must have explicitly position defined
   (absolute, relative, etc).





//  File on server must have header
    Access-Control-Allow-Origin: *

//  clear library intro image

//  show polygons as lines

//  after load zoom to extent