Skip to content

Instantly share code, notes, and snippets.

@pgiraud
Last active April 15, 2016 11:25
Show Gist options
  • Select an option

  • Save pgiraud/aad6db2afd43f02aed1b7e2fb50bfdc3 to your computer and use it in GitHub Desktop.

Select an option

Save pgiraud/aad6db2afd43f02aed1b7e2fb50bfdc3 to your computer and use it in GitHub Desktop.
GMF2 results in a grid
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.2/angular.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css">
</head>
<body ng-app="myApp" ng-controller="MainCtrl as ctrl">
<div class="gmf-results-grid">
<button class="close">&times;</button>
<!-- Nav tabs -->
<ul class="nav nav-tabs small" role="tablist">
<li role="presentation" class="active"><a href="#parcelles" aria-controls="parcelles" role="tab" data-toggle="tab">Parcelles cadastrales (20)</a></li>
<li role="presentation"><a href="#adresses" aria-controls="adresses" role="tab" data-toggle="tab">Adresses (3)</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="parcelles">
<div class="table-container">
<div class="table-container-header">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th>Cadastre <i class="fa fa-sort-down"></i></th>
<th>N° de bien-fonds <i class="text-muted fa fa-sort"></i></th>
<th>Source <i class="text-muted fa fa-sort"></i></th>
<th>Type <i class="text-muted fa fa-sort"></i></th>
<th>Surface RF [m²] <i class="text-muted fa fa-sort"></i></th>
<th>Propriétaire <i class="text-muted fa fa-sort"></i></th>
</tr>
</thead>
</table>
</div>
<div class="table-container-body">
<table class="table table-hover table-bordered">
<tbody>
<tr ng-repeat="row in ctrl.cadastre" ng-click="ctrl.select(row)" ng-class="{active: row.active}">
<td>
{{row.properties.cadastre}}
</td>
<td>
{{row.properties.nummai}}
</td>
<td>
{{row.properties.source}}
</td>
<td>
{{row.properties.typimm}}
</td>
<td>
{{row.properties.srfmai}}
</td>
<td>
<a href>Cliquer ici</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="adresses">
<div class="table-container">
<div class="table-container-header">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th>N° cantonal rue <i class="fa fa-sort-down"></i></th>
<th>Adresse <i class="text-muted fa fa-sort"></i></th>
<th>Source <i class="text-muted fa fa-sort"></i></th>
</tr>
</thead>
</table>
</div>
<div class="table-container-body">
<table class="table table-hover table-condensed table-bordered">
<tbody>
<tr ng-repeat="row in ctrl.adresses">
<td>
{{row.properties.covoie}}
</td>
<td>
{{row.properties.nom_adresse}}
</td>
<td>
{{row.properties.source}}
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="navbar">
<ul class="nav navbar-nav navbar-right">
<li ng-show="ctrl.oneIsSelected()">
<button class="btn btn-link btn-xs" ><i class="fa fa-search-plus"></i> Zoom to</button>
</li>
<li ng-show="ctrl.oneIsSelected()">
<button class="btn btn-link btn-xs" ><i class="fa fa-download"></i> Export as CSV</button>
</li>
<li class="dropdown navbar-link dropup">
<button type="button" class="dropup btn btn-default btn-xs" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Select
<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="dLabel">
<li><a href ng-click="ctrl.selectAll()">All</a></li>
<li><a href ng-click="ctrl.selectNone()">None</a></li>
<li><a href ng-click="ctrl.reverseSelection()">Reverse selection</a></li>
</ul>
</li>
</div>
</div>
</div>
</body>
<script src="https://code.jquery.com/jquery-1.12.3.min.js" integrity="sha256-aaODHAgvwQW1bFOGXMeX+pC4PZIPsvn2h1sArYOhgXQ=" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<script src="script.js"></script>
</html>
Display the source blob
Display the rendered blob
Raw
{
"type": "FeatureCollection",
"crs": {
"type": "name",
"properties": {
"name": "urn:ogc:def:crs:EPSG::21781"
}
},
"features": [{
"type": "Feature",
"properties": {
"gml_id": "parcelles.3823",
"cadastre": "ROCHEFORT",
"nummai": "DP61",
"source": "parcellaire officiel",
"typimm": "DP COMM",
"srfmai": 1353,
"url_terris_v2": "<a href=\"javascript:sitn.propWin('18','DP61');\">Cliquer ici<\/a>"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[551981.08547499997076, 203131.473323],
[551996.119117, 203149.78406599999289],
[551996.206139, 203149.890071],
[552000.7164819999598, 203160.629442],
[552004.077765, 203169.007952],
[552006.1879399999743, 203174.17762],
[552005.43795199994929, 203174.45761599999969],
[552008.69825799996033, 203183.11712899999111],
[552008.898261, 203183.11712899999111],
[552013.85871199995745, 203196.3153499999898],
[552018.59905299998354, 203206.98470199998701],
[552020.20909899997059, 203207.88462299999082],
[552013.839181, 203209.974644],
[552010.598954, 203203.616058],
[552009.438852, 203201.816158],
[552001.84831799997482, 203186.048125],
[552001.28803099994548, 203177.058594],
[552000.757905, 203173.60878099998808],
[551997.9026849999791, 203166.545191],
[551996.117524, 203162.129446],
[551995.92650399997365, 203161.429494],
[551993.846324, 203156.76077699998859],
[551991.58619499998167, 203151.70108299999265],
[551990.26611299999058, 203150.044201],
[551979.675652, 203136.75309899999411],
[551973.016375, 203128.492654],
[551962.929724, 203109.961809],
[551952.856396, 203099.551546],
[551945.927126, 203092.392056],
[551934.826893, 203085.190655],
[551934.086766, 203082.16981799999485],
[551940.06654, 203075.249053],
[551944.81589099997655, 203055.84593],
[551949.840372, 203039.12168199999724],
[551950.29630399995949, 203037.6047599999874],
[551956.11568599997554, 203018.49859],
[551957.01557399996091, 203015.61871899999096],
[551960.675336, 203008.06002599999192],
[551961.705207, 203004.281202],
[551962.36504199996125, 202999.372444],
[551964.834568, 202985.016122],
[551974.432873, 202993.9244839999883],
[551973.267909, 202995.109434],
[551972.536929, 202995.85239899999578],
[551964.41646099998616, 203011.3387909999874],
[551961.65565299999435, 203016.79857799998717],
[551955.306172, 203033.96483],
[551949.126945, 203057.486745],
[551945.26663099997677, 203077.369833],
[551950.077074, 203089.642097],
[551966.22664699994493, 203106.3269319999963],
[551976.725279, 203125.672716],
[551980.94549299997743, 203131.303358],
[551981.08547499997076, 203131.473323]
]
]
}
}, {
"type": "Feature",
"properties": {
"gml_id": "parcelles.3863",
"cadastre": "ROCHEFORT",
"nummai": "DP101",
"source": "parcellaire officiel",
"typimm": "DP CANT",
"srfmai": 2164,
"url_terris_v2": "<a href=\"javascript:sitn.propWin('18','DP101');\">Cliquer ici<\/a>"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[552007.98455599998124, 203012.37582499999553],
[552013.66370799997821, 203016.97648],
[552013.58371799997985, 203017.046479],
[552013.70870299998205, 203017.139475],
[552018.83287, 203020.96717799999169],
[552027.742085, 203027.837651],
[552037.7113599999575, 203035.188051],
[552037.45136499998625, 203035.5780399999931],
[552044.1725299999816, 203040.248674],
[552053.89375899999868, 203046.738121],
[552068.40408699994441, 203056.287354],
[552088.115605, 203070.376223],
[552090.40468699997291, 203072.43608399998629],
[552110.166281, 203090.05475499999011],
[552104.17642599996179, 203094.815655],
[552102.33440399996471, 203093.167775],
[552083.436767, 203076.259025],
[552063.957253, 203061.26218099999824],
[552061.223309, 203063.307116],
[552026.721443, 203039.16707699999097],
[552010.74303, 203026.7550479999918],
[552008.85307399998419, 203028.09501799999271],
[551993.8356119999662, 203014.52303],
[551989.25632199994288, 203006.542522],
[551988.431342, 203007.234498],
[551976.35900599998422, 202996.913283],
[551973.267909, 202995.109434],
[551974.432873, 202993.9244839999883],
[551964.834568, 202985.016122],
[551961.3634369999636, 202981.11139199999161],
[551955.562212, 202974.5898499999894],
[551954.212161, 202973.069946],
[551941.4504599999636, 202960.744409],
[551929.988734, 202951.688751],
[551927.99343499995302, 202950.308148],
[551925.982862, 202948.949884],
[551923.95726399996784, 202947.61409499999718],
[551921.91691399994306, 202946.30097499999101],
[551920.1548, 202945.193322],
[551918.382192, 202944.102569],
[551916.5992, 202943.028831],
[551914.80604599998333, 202941.972148],
[551904.474261, 202936.5054299999902],
[551926.678105, 202937.70205299998634],
[551948.43156499997713, 202954.405394],
[551957.8632699999725, 202964.122093],
[551967.09123699995689, 202974.894605],
[551966.154294, 202976.237556],
[551970.00540499994531, 202979.79627799999435],
[551975.29658399999607, 202984.743927],
[551980.66173699998762, 202989.539576],
[551982.676815, 202991.34241799998563],
[551989.042997, 202997.216993],
[551989.6990409999853, 202997.824954],
[551990.446063, 202998.513891],
[551996.89525599998888, 203004.11447],
[552000.911347, 203007.10625099999015],
[552004.953479, 203010.117021],
[552007.98455599998124, 203012.37582499999553]
]
]
}
}, {
"type": "Feature",
"properties": {
"gml_id": "parcelles.7266",
"cadastre": "ROCHEFORT",
"nummai": "2631",
"source": "parcellaire officiel",
"typimm": "PARCELLE",
"srfmai": 1141,
"url_terris_v2": "<a href=\"javascript:sitn.propWin('18','2631');\">Cliquer ici<\/a>"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[552094.848829, 203137.104682],
[552097.458942, 203140.434455],
[552105.38932399998885, 203151.433728],
[552095.449551, 203158.793574],
[552082.89971899997909, 203163.75458],
[552081.92865899996832, 203162.5346499999869],
[552076.31842699996196, 203155.394131],
[552069.578144, 203146.8347],
[552066.2678709999891, 203139.985133],
[552059.88842099998146, 203126.573953],
[552062.996384, 203125.48592899998766],
[552074.397294, 203121.49490099999821],
[552086.317149, 203116.904894],
[552086.38812899996992, 203116.86790099999052],
[552093.107481, 203126.895259],
[552089.19755799998529, 203129.04519299999811],
[552094.848829, 203137.104682]
]
]
}
}, {
"type": "Feature",
"properties": {
"gml_id": "parcelles.13257",
"cadastre": "ROCHEFORT",
"nummai": "763",
"source": "parcellaire officiel",
"typimm": "PARCELLE",
"srfmai": 1536,
"url_terris_v2": "<a href=\"javascript:sitn.propWin('18','763');\">Cliquer ici<\/a>"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[552102.33440399996471, 203093.167775],
[552090.10675699997228, 203105.405407],
[552095.367006, 203112.144942],
[552086.38812899996992, 203116.86790099999052],
[552086.317149, 203116.904894],
[552074.397294, 203121.49490099999821],
[552062.996384, 203125.48592899998766],
[552059.88842099998146, 203126.573953],
[552056.406165, 203119.0454],
[552050.73574799997732, 203105.8162059999886],
[552047.62448799994309, 203098.16664499999024],
[552058.27527199999895, 203092.15671899999143],
[552064.53517499996815, 203088.71577199999592],
[552069.81509199994616, 203085.815826],
[552083.436767, 203076.259025],
[552102.33440399996471, 203093.167775]
]
]
}
}, {
"type": "Feature",
"properties": {
"gml_id": "parcelles.15628",
"cadastre": "ROCHEFORT",
"nummai": "1168",
"source": "parcellaire officiel",
"typimm": "PARCELLE",
"srfmai": 223,
"url_terris_v2": "<a href=\"javascript:sitn.propWin('18','1168');\">Cliquer ici<\/a>"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[551940.27777699998114, 203112.519154],
[551950.74718199996278, 203123.3373699999938],
[551951.378202, 203123.998334],
[551936.78142899996601, 203132.28320899998653],
[551931.497007, 203119.30598],
[551930.68488399998751, 203115.802177],
[551934.79686899995431, 203114.3951499999966],
[551940.27777699998114, 203112.519154]
]
]
}
}, {
"type": "Feature",
"properties": {
"gml_id": "parcelles.27019",
"cadastre": "ROCHEFORT",
"nummai": "1270",
"source": "parcellaire officiel",
"typimm": "PARCELLE",
"srfmai": 599,
"url_terris_v2": "<a href=\"javascript:sitn.propWin('18','1270');\">Cliquer ici<\/a>"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[552072.506018999964, 203023.71891799999867],
[552056.413636, 203043.52825199998915],
[552053.89375899999868, 203046.738121],
[552044.1725299999816, 203040.248674],
[552037.45136499998625, 203035.5780399999931],
[552037.7113599999575, 203035.188051],
[552046.122011, 203024.65742],
[552056.37759699998423, 203011.70686599999317],
[552072.506018999964, 203023.71891799999867]
]
]
}
}, {
"type": "Feature",
"properties": {
"gml_id": "parcelles.29165",
"cadastre": "ROCHEFORT",
"nummai": "2475",
"source": "parcellaire officiel",
"typimm": "PARCELLE",
"srfmai": 1633,
"url_terris_v2": "<a href=\"javascript:sitn.propWin('18','2475');\">Cliquer ici<\/a>"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[552117.112555, 203038.332258],
[552090.40468699997291, 203072.43608399998629],
[552088.115605, 203070.376223],
[552068.40408699994441, 203056.287354],
[552053.89375899999868, 203046.738121],
[552056.413636, 203043.52825199998915],
[552072.506018999964, 203023.71891799999867],
[552076.00588399998378, 203019.299069],
[552084.66809699998703, 203025.82055299999774],
[552111.501581, 203038.57235699999728],
[552112.367572, 203038.535325],
[552117.112555, 203038.332258]
]
]
}
}, {
"type": "Feature",
"properties": {
"gml_id": "parcelles.31109",
"cadastre": "ROCHEFORT",
"nummai": "2585",
"source": "parcellaire officiel",
"typimm": "PARCELLE",
"srfmai": 1825,
"url_terris_v2": "<a href=\"javascript:sitn.propWin('18','2585');\">Cliquer ici<\/a>"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[551949.840372, 203039.12168199999724],
[551944.81589099997655, 203055.84593],
[551940.06654, 203075.249053],
[551934.086766, 203082.16981799999485],
[551930.856593, 203076.51917899999535],
[551923.006641, 203078.95919399999548],
[551906.790867, 203026.34723],
[551914.410793, 203023.24623099999735],
[551909.07917899999302, 203005.50122899998678],
[551924.299968, 202998.90924199999426],
[551927.03627399995457, 203008.15972],
[551932.31289399997331, 203026.00170699998853],
[551936.214384, 203040.307891],
[551943.8153839999577, 203039.645785],
[551949.840372, 203039.12168199999724]
]
]
}
}, {
"type": "Feature",
"properties": {
"gml_id": "parcelles.32291",
"cadastre": "ROCHEFORT",
"nummai": "764",
"source": "parcellaire officiel",
"typimm": "PARCELLE",
"srfmai": 149,
"url_terris_v2": "<a href=\"javascript:sitn.propWin('18','764');\">Cliquer ici<\/a>"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[551956.887403, 203129.769923],
[551940.02272699994501, 203140.244726],
[551936.78142899996601, 203132.28320899998653],
[551951.378202, 203123.998334],
[551956.887403, 203129.769923]
]
]
}
}, {
"type": "Feature",
"properties": {
"gml_id": "parcelles.32582",
"cadastre": "ROCHEFORT",
"nummai": "1239",
"source": "parcellaire officiel",
"typimm": "PARCELLE",
"srfmai": 839,
"url_terris_v2": "<a href=\"javascript:sitn.propWin('18','1239');\">Cliquer ici<\/a>"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[552010.19851, 203101.41325599999982],
[551981.08547499997076, 203131.473323],
[551980.94549299997743, 203131.303358],
[551976.725279, 203125.672716],
[551966.22664699994493, 203106.3269319999963],
[551967.18658199999481, 203105.408949],
[551967.58158799994271, 203105.421784],
[551967.96947899996303, 203105.345919],
[551968.33056, 203105.18526599998586],
[551968.646592, 203104.947955],
[551968.902796, 203104.64147699999739],
[551969.08348799997475, 203104.2851899999951],
[551969.179355, 203103.89742799999658],
[551969.185535, 203103.49799199998961],
[551981.925178, 203091.917317],
[551985.065225, 203094.069148],
[551998.02442799997516, 203099.59159799999907],
[552005.72450899996329, 203101.09038199999486],
[552010.19851, 203101.41325599999982]
]
]
}
}, {
"type": "Feature",
"properties": {
"gml_id": "parcelles.33714",
"cadastre": "ROCHEFORT",
"nummai": "901",
"source": "parcellaire officiel",
"typimm": "PARCELLE",
"srfmai": 630,
"url_terris_v2": "<a href=\"javascript:sitn.propWin('18','901');\">Cliquer ici<\/a>"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[551962.929724, 203109.961809],
[551973.016375, 203128.492654],
[551974.235481, 203131.903441],
[551965.326677, 203138.02233499998692],
[551956.887403, 203129.769923],
[551951.378202, 203123.998334],
[551950.74718199996278, 203123.3373699999938],
[551940.27777699998114, 203112.519154],
[551937.476672, 203109.624358],
[551952.856396, 203099.551546],
[551962.929724, 203109.961809]
]
]
}
}, {
"type": "Feature",
"properties": {
"gml_id": "parcelles.34402",
"cadastre": "ROCHEFORT",
"nummai": "1788",
"source": "parcellaire officiel",
"typimm": "PARCELLE",
"srfmai": 511,
"url_terris_v2": "<a href=\"javascript:sitn.propWin('18','1788');\">Cliquer ici<\/a>"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[552063.957253, 203061.26218099999824],
[552083.436767, 203076.259025],
[552069.81509199994616, 203085.815826],
[552064.53517499996815, 203088.71577199999592],
[552046.58365699998103, 203074.2568709999905],
[552061.223309, 203063.307116],
[552063.957253, 203061.26218099999824]
]
]
}
}, {
"type": "Feature",
"properties": {
"gml_id": "parcelles.35353",
"cadastre": "ROCHEFORT",
"nummai": "3034",
"source": "parcellaire officiel",
"typimm": "PARCELLE",
"srfmai": 1531,
"url_terris_v2": "<a href=\"javascript:sitn.propWin('18','3034');\">Cliquer ici<\/a>"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[552026.721443, 203039.16707699999097],
[551990.952703, 203077.3008799999952],
[551968.601982, 203057.085373],
[551969.910857, 203053.987491],
[551971.545899, 203054.71942199999467],
[551973.54485299997032, 203053.439443],
[551994.84411199996248, 203030.091209],
[552000.1241109999828, 203029.50312899998971],
[551999.220542, 203028.330297],
[551998.339306, 203027.140642],
[551997.48065, 203025.93455299999914],
[551996.644958, 203024.712455],
[551995.8406899999827, 203023.488982],
[551995.05908499995712, 203022.250933],
[551994.300334, 203020.998732],
[551993.564766, 203019.73274899998796],
[551993.201158, 203019.12519399999292],
[551992.94572299998254, 203018.464791],
[551992.80587799998466, 203017.770705],
[551992.78566, 203017.062894],
[551992.883505, 203016.37045399998897],
[551993.09559399995487, 203015.70406899999944],
[551993.41593899996951, 203015.082422],
[551993.8356119999662, 203014.52303],
[552008.85307399998419, 203028.09501799999271],
[552010.74303, 203026.7550479999918],
[552026.721443, 203039.16707699999097]
]
]
}
}, {
"type": "Feature",
"properties": {
"gml_id": "parcelles.39271",
"cadastre": "ROCHEFORT",
"nummai": "1238",
"source": "parcellaire officiel",
"typimm": "PARCELLE",
"srfmai": 570,
"url_terris_v2": "<a href=\"javascript:sitn.propWin('18','1238');\">Cliquer ici<\/a>"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[552050.73574799997732, 203105.8162059999886],
[552056.406165, 203119.0454],
[552036.84347399999388, 203129.108301],
[552035.545367, 203125.956467],
[552028.27479299996048, 203108.3065329999954],
[552025.41155199997593, 203101.355956],
[552030.93451499997173, 203100.87684199999785],
[552047.62448799994309, 203098.16664499999024],
[552050.73574799997732, 203105.8162059999886]
]
]
}
}, {
"type": "Feature",
"properties": {
"gml_id": "parcelles.40293",
"cadastre": "ROCHEFORT",
"nummai": "438",
"source": "parcellaire officiel",
"typimm": "PARCELLE",
"srfmai": 590,
"url_terris_v2": "<a href=\"javascript:sitn.propWin('18','438');\">Cliquer ici<\/a>"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[551945.927126, 203092.392056],
[551952.856396, 203099.551546],
[551937.476672, 203109.624358],
[551940.27777699998114, 203112.519154],
[551934.79686899995431, 203114.3951499999966],
[551930.68488399998751, 203115.802177],
[551928.246562, 203105.28374099999201],
[551926.64635, 203099.233104],
[551921.17566099995747, 203079.529233],
[551923.006641, 203078.95919399999548],
[551930.856593, 203076.51917899999535],
[551934.086766, 203082.16981799999485],
[551934.826893, 203085.190655],
[551945.927126, 203092.392056]
]
]
}
}, {
"type": "Feature",
"properties": {
"gml_id": "parcelles.52960",
"cadastre": "ROCHEFORT",
"nummai": "2324",
"source": "parcellaire officiel",
"typimm": "PARCELLE",
"srfmai": 1106,
"url_terris_v2": "<a href=\"javascript:sitn.propWin('18','2324');\">Cliquer ici<\/a>"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[551940.02272699994501, 203140.244726],
[551941.54786599997897, 203143.990525],
[551944.248077, 203150.651117],
[551914.387554, 203165.88294899999164],
[551901.966525, 203136.4987329999858],
[551931.497007, 203119.30598],
[551936.78142899996601, 203132.28320899998653],
[551940.02272699994501, 203140.244726]
]
]
}
}, {
"type": "Feature",
"properties": {
"gml_id": "parcelles.53174",
"cadastre": "ROCHEFORT",
"nummai": "861",
"source": "parcellaire officiel",
"typimm": "PARCELLE",
"srfmai": 1539,
"url_terris_v2": "<a href=\"javascript:sitn.propWin('18','861');\">Cliquer ici<\/a>"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[552028.27479299996048, 203108.3065329999954],
[552035.545367, 203125.956467],
[552036.84347399999388, 203129.108301],
[551996.119117, 203149.78406599999289],
[551981.08547499997076, 203131.473323],
[552010.19851, 203101.41325599999982],
[552018.14454899996053, 203101.988057],
[552025.41155199997593, 203101.355956],
[552028.27479299996048, 203108.3065329999954]
]
]
}
}, {
"type": "Feature",
"properties": {
"gml_id": "parcelles.53925",
"cadastre": "ROCHEFORT",
"nummai": "714",
"source": "parcellaire officiel",
"typimm": "PARCELLE",
"srfmai": 932,
"url_terris_v2": "<a href=\"javascript:sitn.propWin('18','714');\">Cliquer ici<\/a>"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[551994.84411199996248, 203030.091209],
[551973.54485299997032, 203053.439443],
[551971.545899, 203054.71942199999467],
[551969.910857, 203053.987491],
[551961.518582, 203045.096125],
[551955.306172, 203033.96483],
[551961.65565299999435, 203016.79857799998717],
[551964.41646099998616, 203011.3387909999874],
[551972.55673499999102, 203019.23822599998675],
[551973.19775299995672, 203019.859177],
[551972.385767, 203020.53014899999835],
[551973.53581499995198, 203021.64808099999209],
[551977.1859359999653, 203025.19882799999323],
[551977.655932, 203025.658797],
[551978.725908, 203024.61882],
[551986.625689, 203016.94105399999535],
[551988.065564, 203014.06217099999776],
[551990.264877, 203022.3617],
[551994.84411199996248, 203030.091209]
]
]
}
}, {
"type": "Feature",
"properties": {
"gml_id": "parcelles.56021",
"cadastre": "ROCHEFORT",
"nummai": "2455",
"source": "parcellaire officiel",
"typimm": "PARCELLE",
"srfmai": 712,
"url_terris_v2": "<a href=\"javascript:sitn.propWin('18','2455');\">Cliquer ici<\/a>"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[551930.68488399998751, 203115.802177],
[551931.497007, 203119.30598],
[551901.966525, 203136.4987329999858],
[551894.1359109999612, 203118.104827],
[551926.64635, 203099.233104],
[551928.246562, 203105.28374099999201],
[551930.68488399998751, 203115.802177]
]
]
}
}, {
"type": "Feature",
"properties": {
"gml_id": "parcelles.61807",
"cadastre": "ROCHEFORT",
"nummai": "1053",
"source": "parcellaire officiel",
"typimm": "PARCELLE",
"srfmai": 1495,
"url_terris_v2": "<a href=\"javascript:sitn.propWin('18','1053');\">Cliquer ici<\/a>"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[552066.2678709999891, 203139.985133],
[552010.877683, 203165.956955],
[552004.077765, 203169.007952],
[552000.7164819999598, 203160.629442],
[551996.206139, 203149.890071],
[551996.119117, 203149.78406599999289],
[552036.84347399999388, 203129.108301],
[552056.406165, 203119.0454],
[552059.88842099998146, 203126.573953],
[552066.2678709999891, 203139.985133]
]
]
}
}, {
"type": "Feature",
"properties": {
"gml_id": "parcelles.67626",
"cadastre": "ROCHEFORT",
"nummai": "3035",
"source": "parcellaire officiel",
"typimm": "PARCELLE",
"srfmai": 4719,
"url_terris_v2": "<a href=\"javascript:sitn.propWin('18','3035');\">Cliquer ici<\/a>"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[551968.601982, 203057.085373],
[551990.952703, 203077.3008799999952],
[552026.721443, 203039.16707699999097],
[552061.223309, 203063.307116],
[552046.58365699998103, 203074.2568709999905],
[552064.53517499996815, 203088.71577199999592],
[552058.27527199999895, 203092.15671899999143],
[552047.62448799994309, 203098.16664499999024],
[552030.93451499997173, 203100.87684199999785],
[552025.41155199997593, 203101.355956],
[552018.14454899996053, 203101.988057],
[552010.19851, 203101.41325599999982],
[552005.72450899996329, 203101.09038199999486],
[551998.02442799997516, 203099.59159799999907],
[551985.065225, 203094.069148],
[551981.925178, 203091.917317],
[551969.185535, 203103.49799199998961],
[551969.179355, 203103.89742799999658],
[551969.08348799997475, 203104.2851899999951],
[551968.902796, 203104.64147699999739],
[551968.646592, 203104.947955],
[551968.33056, 203105.18526599998586],
[551967.96947899996303, 203105.345919],
[551967.58158799994271, 203105.421784],
[551967.18658199999481, 203105.408949],
[551966.22664699994493, 203106.3269319999963],
[551950.077074, 203089.642097],
[551945.26663099997677, 203077.369833],
[551949.126945, 203057.486745],
[551955.306172, 203033.96483],
[551961.518582, 203045.096125],
[551969.910857, 203053.987491],
[551968.601982, 203057.085373]
]
]
}
}]
}
var myApp = angular.module('myApp', []);
myApp.controller('MainCtrl', function($http, $timeout) {
var self = this;
$http({
method: 'GET',
url: 'parcelles.json'
}).then(function successCallback(response) {
self.cadastre = response.data.features;
redraw();
});
$http({
method: 'GET',
url: 'adresses.json'
}).then(function successCallback(response) {
self.adresses = response.data.features;
redraw();
});
this.select = function(row) {
row.active = !row.active;
};
this.selectAll = function() {
self.cadastre.forEach(function(row) {
row.active = true;
});
};
this.selectNone = function() {
self.cadastre.forEach(function(row) {
row.active = false;
});
};
this.reverseSelection = function() {
self.cadastre.forEach(function(row) {
row.active = !row.active;
});
};
this.oneIsSelected = function() {
if (self.cadastre) {
return self.cadastre.some(function(row) {
return row.active;
});
}
return false;
};
});
// Get ScrollBar width(From: http://bootstrap-table.wenzhixin.net.cn/)
var scrollBarWidth = (function () {
var inner = $('<p/>').addClass('fixed-table-scroll-inner'),
outer = $('<div/>').addClass('fixed-table-scroll-outer'),
w1, w2;
outer.append(inner);
$('body').append(outer);
w1 = inner[0].offsetWidth;
outer.css('overflow', 'scroll');
w2 = inner[0].offsetWidth;
if (w1 === w2) {
w2 = outer[0].clientWidth;
}
outer.remove();
return w1 - w2;
})();
// Redraw Header
function redraw() {
$('.tab-pane').each(function() {
var tabPane = $(this);
// code below is courtasy of http://jsfiddle.net/0x3333/f0vfpvLm/4/
var $body = $(tabPane).find(".table-container-body"),
$header = $(tabPane).find(".table-container-header");
var tds = $body.find("table > tbody > tr:first-child > td");
tds.each(function (i) {
var width = $(this).innerWidth(),
lastPadding = (tds.length -1 == i ? scrollBarWidth : 0);
$header.find("th:eq("+i+")").innerWidth(width + lastPadding);
});
});
}
// Listen to Resize Window
$(window).resize(redraw);
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
redraw();
});
.table {
font-size: 0.85em;
background-color: white;
}
.table-container {
border: 1px solid #ddd;
border-top: 0;
}
.table-container-header {
overflow: hidden;
width: 100%;
}
.table-container-body {
height: 154px;
overflow: auto;
width: 100%;
}
.table-container table {
margin-bottom: 0px;
table-layout: fixed;
}
.table-container table td,
.table-container table th {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
cursor: pointer;
}
.table-bordered {
border: 0px;
}
.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td {
border-bottom-width: 2px;
}
.table-bordered > tfoot > tr > th,
.table-bordered > tfoot > tr > td {
border-top-width: 2px;
}
.table-bordered > tfoot > tr > th,
.table-bordered > tfoot > tr > td {
border-bottom-width: 0px;
}
/*Esquerda*/
.table-bordered > thead > tr > th:first-child,
.table-bordered > tbody > tr > th:first-child,
.table-bordered > tfoot > tr > th:first-child,
.table-bordered > thead > tr > td:first-child,
.table-bordered > tbody > tr > td:first-child,
.table-bordered > tfoot > tr > td:first-child {
border-left-width: 0px;
}
/*Direita*/
.table-bordered > thead > tr > th:last-child,
.table-bordered > tbody > tr > th:last-child,
.table-bordered > tfoot > tr > th:last-child,
.table-bordered > thead > tr > td:last-child,
.table-bordered > tbody > tr > td:last-child,
.table-bordered > tfoot > tr > td:last-child {
border-right-width: 0px;
}
/*Topo*/
.table-bordered > thead > tr:first-child > th,
.table-bordered > thead > tr:first-child > td {
border-top-width: 0px;
}
/*Baixo*/
.table-bordered > tfoot > tr:last-child > th,
.table-bordered > tfoot > tr:last-child > td {
border-bottom-width: 0px;
}
.gmf-results-grid table>tbody>tr>td,
.gmf-results-grid table>tbody>tr>th,
.gmf-results-grid table>tfoot>tr>td,
.gmf-results-grid table>tfoot>tr>th,
.gmf-results-grid table>thead>tr>td,
.gmf-results-grid table>thead>tr>th {
padding: 2px;
}
.gmf-results-grid {
padding: 4px;
}
.gmf-results-grid .nav-tabs>li>a {
padding: 2px 7px;
}
th > .fa-sort {
visibility: hidden;
}
th:hover > .fa-sort {
visibility: visible;
}
.gmf-results-grid .navbar {
min-height: 0;
margin-bottom: 0;
margin-right: 15px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment