2017-02-15 6 views
0

Revitファイルをhtmlページに挿入する方法はありますか?rvtファイルがあり、geojsonファイルに変換しようとしました。作業...誰もが....Revitファイルをhtmlに追加する

私を助けることができる、これはにGeoJSONです:

[ 
    { 
     "type": "FeatureCollection", 
     "crs": { 
      "type": "name", 
      "properties": { 
       "name": "urn:ogc:def:crs:OGC:1.3:CRS84" 
      } 
     }, 
     "features": [ 
      { 
       "type": "Feature", 
       "properties": { 
        "name": "CEO", 
        "roomno": 1, 
        "ph": 200 
       }, 
       "geometry": { 
        "type": "Polygon", 
        "coordinates": [ 
         [ 
          [ 
           77.5987896482477, 
           12.983168941037594 
          ], 
          [ 
           77.59896972798799, 
           12.983169878952907 
          ], 
          [ 
           77.59896972798799, 
           12.983106369240323 
          ], 
          [ 
           77.5990585784097, 
           12.983106485384665 
          ], 
          [ 
           77.59905799603237, 
           12.982853151249317 
          ], 
          [ 
           77.5987896482477, 
           12.98285279440386 
          ], 
          [ 
           77.5987896482477, 
           12.983168941037594 
          ] 
         ] 
        ] 
       } 
      }, 
      { 
       "type": "Feature", 
       "properties": { 
        "name": "MD", 
        "roomno": 2, 
        "ph": 201 
       }, 
       "geometry": { 
        "type": "Polygon", 
        "coordinates": [ 
         [ 
          [ 
           77.5987896482477, 
           12.983168941037594 
          ], 
          [ 
           77.59878830101773, 
           12.983479517309322 
          ], 
          [ 
           77.59905944627795, 
           12.983484008075912 
          ], 
          [ 
           77.59905885920351, 
           12.983228630695868 
          ], 
          [ 
           77.59896972798799, 
           12.983228514488285 
          ], 
          [ 
           77.59896972798799, 
           12.983169878952907 
          ], 
          [ 
           77.5987896482477, 
           12.983168941037594 
          ] 
         ] 
        ] 
       } 
      }, 
      { 
       "type": "Feature", 
       "properties": { 
        "name": "Hall", 
        "roomno": 8, 
        "ph": null 
       }, 
       "geometry": { 
        "type": "Polygon", 
        "coordinates": [ 
         [ 
          [ 
           77.59932180408867, 
           12.983287156750118 
          ], 
          [ 
           77.59950020019542, 
           12.98328612555875 
          ], 
          [ 
           77.5995003304455, 
           12.98322920627767 
          ], 
          [ 
           77.59976293746367, 
           12.983229548659702 
          ], 
          [ 
           77.59994467341478, 
           12.983229785603577 
          ], 
          [ 
           77.59994467341478, 
           12.98310764367879 
          ], 
          [ 
           77.599716099465, 
           12.983107344889312 
          ], 
          [ 
           77.59950060994909, 
           12.98310706320367 
          ], 
          [ 
           77.59950118963468, 
           12.982853740602511 
          ], 
          [ 
           77.59932180408867, 
           12.982853502057903 
          ], 
          [ 
           77.59932180408867, 
           12.98310682947052 
          ], 
          [ 
           77.5990585784097, 
           12.983106485384665 
          ], 
          [ 
           77.59896972798799, 
           12.983106369240323 
          ], 
          [ 
           77.59896972798799, 
           12.983169878952907 
          ], 
          [ 
           77.59896972798799, 
           12.983228514488285 
          ], 
          [ 
           77.59905885920351, 
           12.983228630695868 
          ], 
          [ 
           77.59932180408867, 
           12.983228973518404 
          ], 
          [ 
           77.59932180408867, 
           12.983287156750118 
          ] 
         ] 
        ] 
       } 
      }, 
      { 
       "type": "Feature", 
       "properties": { 
        "name": "StairCase", 
        "roomno": 9, 
        "ph": null 
       }, 
       "geometry": { 
        "type": "Polygon", 
        "coordinates": [ 
         [ 
          [ 
           77.59950020019542, 
           12.98328612555875 
          ], 
          [ 
           77.59932180408867, 
           12.983287156750118 
          ], 
          [ 
           77.59932180408867, 
           12.983484008075912 
          ], 
          [ 
           77.59949974737502, 
           12.983484008075912 
          ], 
          [ 
           77.59950020019542, 
           12.98328612555875 
          ] 
         ] 
        ] 
       } 
      }, 
      { 
       "type": "Feature", 
       "properties": { 
        "name": "Development Area", 
        "roomno": 4, 
        "ph": 204 
       }, 
       "geometry": { 
        "type": "Polygon", 
        "coordinates": [ 
         [ 
          [ 
           77.59971805557235, 
           12.982854028988067 
          ], 
          [ 
           77.59950118963468, 
           12.982853740602511 
          ], 
          [ 
           77.59950060994909, 
           12.98310706320367 
          ], 
          [ 
           77.599716099465, 
           12.983107344889312 
          ], 
          [ 
           77.59971805557235, 
           12.982854028988067 
          ] 
         ] 
        ] 
       } 
      }, 
      { 
       "type": "Feature", 
       "properties": { 
        "name": "Conference", 
        "roomno": 3, 
        "ph": 203 
       }, 
       "geometry": { 
        "type": "Polygon", 
        "coordinates": [ 
         [ 
          [ 
           77.59994467341478, 
           12.982854330341581 
          ], 
          [ 
           77.59971805557235, 
           12.982854028988067 
          ], 
          [ 
           77.599716099465, 
           12.983107344889312 
          ], 
          [ 
           77.59994467341478, 
           12.98310764367879 
          ], 
          [ 
           77.59994467341478, 
           12.982854330341581 
          ] 
         ] 
        ] 
       } 
      }, 
      { 
       "type": "Feature", 
       "properties": { 
        "name": "Cabin 2", 
        "roomno": 6, 
        "ph": 206 
       }, 
       "geometry": { 
        "type": "Polygon", 
        "coordinates": [ 
         [ 
          [ 
           77.59932180408867, 
           12.982853502057903 
          ], 
          [ 
           77.59905799603237, 
           12.982853151249317 
          ], 
          [ 
           77.5990585784097, 
           12.983106485384665 
          ], 
          [ 
           77.59932180408867, 
           12.98310682947052 
          ], 
          [ 
           77.59932180408867, 
           12.982853502057903 
          ] 
         ] 
        ] 
       } 
      }, 
      { 
       "type": "Feature", 
       "properties": { 
        "name": "Refreshment", 
        "roomno": 7, 
        "ph": null 
       }, 
       "geometry": { 
        "type": "Polygon", 
        "coordinates": [ 
         [ 
          [ 
           77.59994467341478, 
           12.983229785603577 
          ], 
          [ 
           77.59976293746367, 
           12.983229548659702 
          ], 
          [ 
           77.59976064503648, 
           12.983484008075912 
          ], 
          [ 
           77.59994467341478, 
           12.983484008075912 
          ], 
          [ 
           77.59994467341478, 
           12.983229785603577 
          ] 
         ] 
        ] 
       } 
      }, 
      { 
       "type": "Feature", 
       "properties": { 
        "name": "Canteen", 
        "roomno": 6, 
        "ph": 206 
       }, 
       "geometry": { 
        "type": "Polygon", 
        "coordinates": [ 
         [ 
          [ 
           77.59976293746367, 
           12.983229548659702 
          ], 
          [ 
           77.5995003304455, 
           12.98322920627767 
          ], 
          [ 
           77.59949974737502, 
           12.983484008075912 
          ], 
          [ 
           77.59976064503648, 
           12.983484008075912 
          ], 
          [ 
           77.59976293746367, 
           12.983229548659702 
          ] 
         ] 
        ] 
       } 
      }, 
      { 
       "type": "Feature", 
       "properties": { 
        "name": "Cabin 1", 
        "roomno": 5, 
        "ph": 205 
       }, 
       "geometry": { 
        "type": "Polygon", 
        "coordinates": [ 
         [ 
          [ 
           77.59932180408867, 
           12.983228973518404 
          ], 
          [ 
           77.59905885920351, 
           12.983228630695868 
          ], 
          [ 
           77.59905944627795, 
           12.983484008075912 
          ], 
          [ 
           77.59932180408867, 
           12.983484008075912 
          ], 
          [ 
           77.59932180408867, 
           12.983228973518404 
          ] 
         ] 
        ] 
       } 
      }, 
      { 
       "type": "Feature", 
       "properties": { 
        "name": "entrance", 
        "roomno": 10, 
        "ph": null 
       }, 
       "geometry": { 
        "type": "Polygon", 
        "coordinates": [ 
         [ 
          [ 
           77.59950118963468, 
           12.982853740602511 
          ], 
          [ 
           77.59950131349133, 
           12.982799615247522 
          ], 
          [ 
           77.59932180408867, 
           12.982799615247522 
          ], 
          [ 
           77.59932180408867, 
           12.982853502057903 
          ], 
          [ 
           77.59950118963468, 
           12.982853740602511 
          ] 
         ] 
        ] 
       } 
      } 
     ] 
    } 
] 

、これが私のスクリプトです:

var map = new L.Map('map'); 
map.setView([12.98317,77.59941], 16, 
false); 
map.setView([12.98317,77.59941], 16, false); 
map.setView([12.98317,77.59941], 16, false); 
map.setView([12.98317,77.59941], 16, false); 

new L.TileLayer('http://{s}.tiles.mapbox.com/v3/osmbuildings.kbpalbpk/{z}/{x}/{y}.png', 
{ attribution: 'Map tiles &copy; <a 
href="http://mapbox.com"MapBox</a', maxZoom: 15, maxNativeZoom: 
20 }).addTo(map); 

var osmb = new OSMBuildings(map); 

//************************************************************ 

var geoJsonBlock; 

function getCenter(geoJson) { var geometry, len = 0, lat = 0, lon = 
0; 

    for (var i = 0, il = geoJson.features.length; i < il; i++) { 
    geometry = geoJson.features[i].geometry.coordinates[0]; 
    if (geometry[0][0][0]) { 
     geometry = geometry[0]; 
    } 

    len += geometry.length-1; 
    for (var j = 0, jl = geometry.length-1; j < jl; j++) { 
     lat += geometry[j][1]; 
     lon += geometry[j][0]; 
    } } 

    return { lat:lat/len, lon:lon/len }; } 

function setGeoJSON() { try { 
    var geoJson = JSON.parse(geoJsonBlock.value); } catch(e) {} osmb.addGeoJSON('C:\Users\......\Desktop\.....\groundfloor_polygon.geojson'); 
var center = getCenter(geoJson); map.setView([center.lat, 
center.lon], 17) } 

geoJsonBlock = document.querySelector('textarea'); setGeoJSON(); 

答えて

0

はい、あなたは非常に簡単に実際に追加することができますRevitモデルをHTMLページに変換します。さらに、ForgeまたはA360ビューアを使用して追加することができます。ユーザーは、パン、ズーム、回転、およびデータ構造やプロパティのクエリを使用してモデルをナビゲートできます。無料のアカウントを使用してモデルをA360にアップロードし、埋め込みオプションを使用して、既存のHTMLページに追加できるHTMLスニペットを作成します。

関連する問題