load .dxf file


<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/grid.dxf.shp;
    cad.clear();
    cad.addDxf(file, [220, 220, 0 ] )
        .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