Skip to content

Commit

Permalink
2024-12-13 1730
Browse files Browse the repository at this point in the history
  • Loading branch information
avikla committed Dec 13, 2024
1 parent 11d02b5 commit fd3df65
Show file tree
Hide file tree
Showing 14 changed files with 150 additions and 66 deletions.
92 changes: 67 additions & 25 deletions Aqueduct.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<script src="data/Tunnels_12.js"></script>
<script src="data/Shafts_13.js"></script>
<script src="data/Pools_14.js"></script>
<script src="data/ArticlesDigs_15.js"></script>
<script src="data/DigsArticles_15.js"></script>
<script src="data/Places_16.js"></script>
<script>
var highlightLayer;
Expand Down Expand Up @@ -195,6 +195,9 @@
<tr>\
<td class="visible-with-data" id="Name"colspan="2"><strong>Name</strong><br />' + (feature.properties['Name'] !== null ? autolinker.link(feature.properties['Name'].toLocaleString()) : '') + '</td>\
</tr>\
<tr>\
<td colspan="2">' + (feature.properties['Length_m'] !== null ? autolinker.link(feature.properties['Length_m'].toLocaleString()) : '') + '</td>\
</tr>\
</table>';
var content = removeEmptyRowsFromPopupContent(popupContent, feature);
layer.on('popupopen', function(e) {
Expand Down Expand Up @@ -246,7 +249,7 @@
<td class="visible-with-data" id="Name"colspan="2"><strong>Name</strong><br />' + (feature.properties['Name'] !== null ? autolinker.link(feature.properties['Name'].toLocaleString()) : '') + '</td>\
</tr>\
<tr>\
<td colspan="2">' + (feature.properties['ID'] !== null ? autolinker.link(feature.properties['ID'].toLocaleString()) : '') + '</td>\
<td colspan="2">' + (feature.properties['Length_m'] !== null ? autolinker.link(feature.properties['Length_m'].toLocaleString()) : '') + '</td>\
</tr>\
</table>';
var content = removeEmptyRowsFromPopupContent(popupContent, feature);
Expand Down Expand Up @@ -298,6 +301,9 @@
<tr>\
<td class="visible-with-data" id="Name_Heb"colspan="2"><strong>Name_Heb</strong><br />' + (feature.properties['Name_Heb'] !== null ? autolinker.link(feature.properties['Name_Heb'].toLocaleString()) : '') + '</td>\
</tr>\
<tr>\
<td colspan="2">' + (feature.properties['Length_m'] !== null ? autolinker.link(feature.properties['Length_m'].toLocaleString()) : '') + '</td>\
</tr>\
</table>';
var content = removeEmptyRowsFromPopupContent(popupContent, feature);
layer.on('popupopen', function(e) {
Expand Down Expand Up @@ -345,6 +351,9 @@
mouseover: highlightFeature,
});
var popupContent = '<table>\
<tr>\
<td colspan="2">' + (feature.properties['Length_m'] !== null ? autolinker.link(feature.properties['Length_m'].toLocaleString()) : '') + '</td>\
</tr>\
</table>';
var content = removeEmptyRowsFromPopupContent(popupContent, feature);
layer.on('popupopen', function(e) {
Expand Down Expand Up @@ -398,6 +407,12 @@
<tr>\
<td colspan="2">' + (feature.properties['End'] !== null ? autolinker.link(feature.properties['End'].toLocaleString()) : '') + '</td>\
</tr>\
<tr>\
<td colspan="2">' + (feature.properties['Name_HE'] !== null ? autolinker.link(feature.properties['Name_HE'].toLocaleString()) : '') + '</td>\
</tr>\
<tr>\
<td colspan="2">' + (feature.properties['Length_m'] !== null ? autolinker.link(feature.properties['Length_m'].toLocaleString()) : '') + '</td>\
</tr>\
</table>';
var content = removeEmptyRowsFromPopupContent(popupContent, feature);
layer.on('popupopen', function(e) {
Expand Down Expand Up @@ -448,6 +463,15 @@
<tr>\
<td colspan="2"><strong>id</strong><br />' + (feature.properties['id'] !== null ? autolinker.link(feature.properties['id'].toLocaleString()) : '') + '</td>\
</tr>\
<tr>\
<td colspan="2">' + (feature.properties['Name_EN'] !== null ? autolinker.link(feature.properties['Name_EN'].toLocaleString()) : '') + '</td>\
</tr>\
<tr>\
<td colspan="2">' + (feature.properties['Name-HE'] !== null ? autolinker.link(feature.properties['Name-HE'].toLocaleString()) : '') + '</td>\
</tr>\
<tr>\
<td colspan="2">' + (feature.properties['Length_m'] !== null ? autolinker.link(feature.properties['Length_m'].toLocaleString()) : '') + '</td>\
</tr>\
</table>';
var content = removeEmptyRowsFromPopupContent(popupContent, feature);
layer.on('popupopen', function(e) {
Expand Down Expand Up @@ -495,6 +519,15 @@
mouseover: highlightFeature,
});
var popupContent = '<table>\
<tr>\
<td colspan="2">' + (feature.properties['Name-HE'] !== null ? autolinker.link(feature.properties['Name-HE'].toLocaleString()) : '') + '</td>\
</tr>\
<tr>\
<td colspan="2">' + (feature.properties['Name-EN'] !== null ? autolinker.link(feature.properties['Name-EN'].toLocaleString()) : '') + '</td>\
</tr>\
<tr>\
<td colspan="2">' + (feature.properties['Length_m'] !== null ? autolinker.link(feature.properties['Length_m'].toLocaleString()) : '') + '</td>\
</tr>\
</table>';
var content = removeEmptyRowsFromPopupContent(popupContent, feature);
layer.on('popupopen', function(e) {
Expand Down Expand Up @@ -548,6 +581,9 @@
<tr>\
<td colspan="2">' + (feature.properties['Link'] !== null ? autolinker.link(feature.properties['Link'].toLocaleString()) : '') + '</td>\
</tr>\
<tr>\
<td colspan="2">' + (feature.properties['Length-M'] !== null ? autolinker.link(feature.properties['Length-M'].toLocaleString()) : '') + '</td>\
</tr>\
</table>';
var content = removeEmptyRowsFromPopupContent(popupContent, feature);
layer.on('popupopen', function(e) {
Expand Down Expand Up @@ -625,6 +661,12 @@
mouseover: highlightFeature,
});
var popupContent = '<table>\
<tr>\
<td colspan="2">' + (feature.properties['Order'] !== null ? autolinker.link(feature.properties['Order'].toLocaleString()) : '') + '</td>\
</tr>\
<tr>\
<td colspan="2">' + (feature.properties['Length_m'] !== null ? autolinker.link(feature.properties['Length_m'].toLocaleString()) : '') + '</td>\
</tr>\
</table>';
var content = removeEmptyRowsFromPopupContent(popupContent, feature);
layer.on('popupopen', function(e) {
Expand Down Expand Up @@ -743,10 +785,10 @@
<td class="visible-with-data" id="Name_Engli"colspan="2"><strong>Name English:</strong><br />' + (feature.properties['Name_Engli'] !== null ? autolinker.link(feature.properties['Name_Engli'].toLocaleString()) : '') + '</td>\
</tr>\
<tr>\
<td class="visible-with-data" id="Length"colspan="2"><strong>Length (m):</strong><br />' + (feature.properties['Length'] !== null ? autolinker.link(feature.properties['Length'].toLocaleString()) : '') + '</td>\
<td class="visible-with-data" id="Name HE"colspan="2"><strong>Name Hebrew:</strong><br />' + (feature.properties['Name HE'] !== null ? autolinker.link(feature.properties['Name HE'].toLocaleString()) : '') + '</td>\
</tr>\
<tr>\
<td class="visible-with-data" id="Name HE"colspan="2"><strong>Name Hebrew:</strong><br />' + (feature.properties['Name HE'] !== null ? autolinker.link(feature.properties['Name HE'].toLocaleString()) : '') + '</td>\
<td class="visible-with-data" id="Length_m"colspan="2"><strong>Length_m</strong><br />' + (feature.properties['Length_m'] !== null ? autolinker.link(feature.properties['Length_m'].toLocaleString()) : '') + '</td>\
</tr>\
</table>';
var content = removeEmptyRowsFromPopupContent(popupContent, feature);
Expand Down Expand Up @@ -928,7 +970,7 @@
});
bounds_group.addLayer(layer_Pools_14);
map.addLayer(layer_Pools_14);
function pop_ArticlesDigs_15(feature, layer) {
function pop_DigsArticles_15(feature, layer) {
layer.on({
mouseout: function(e) {
for (var i in e.target._eventParents) {
Expand Down Expand Up @@ -966,9 +1008,9 @@
layer.bindPopup(content, { maxHeight: 400 });
}

function style_ArticlesDigs_15_0() {
function style_DigsArticles_15_0() {
return {
pane: 'pane_ArticlesDigs_15',
pane: 'pane_DigsArticles_15',
shape: 'diamond',
radius: 8.8,
opacity: 1,
Expand All @@ -983,26 +1025,26 @@
interactive: true,
}
}
map.createPane('pane_ArticlesDigs_15');
map.getPane('pane_ArticlesDigs_15').style.zIndex = 415;
map.getPane('pane_ArticlesDigs_15').style['mix-blend-mode'] = 'normal';
var layer_ArticlesDigs_15 = new L.geoJson(json_ArticlesDigs_15, {
map.createPane('pane_DigsArticles_15');
map.getPane('pane_DigsArticles_15').style.zIndex = 415;
map.getPane('pane_DigsArticles_15').style['mix-blend-mode'] = 'normal';
var layer_DigsArticles_15 = new L.geoJson(json_DigsArticles_15, {
attribution: '',
interactive: true,
dataVar: 'json_ArticlesDigs_15',
layerName: 'layer_ArticlesDigs_15',
pane: 'pane_ArticlesDigs_15',
onEachFeature: pop_ArticlesDigs_15,
dataVar: 'json_DigsArticles_15',
layerName: 'layer_DigsArticles_15',
pane: 'pane_DigsArticles_15',
onEachFeature: pop_DigsArticles_15,
pointToLayer: function (feature, latlng) {
var context = {
feature: feature,
variables: {}
};
return L.shapeMarker(latlng, style_ArticlesDigs_15_0(feature));
return L.shapeMarker(latlng, style_DigsArticles_15_0(feature));
},
});
bounds_group.addLayer(layer_ArticlesDigs_15);
map.addLayer(layer_ArticlesDigs_15);
bounds_group.addLayer(layer_DigsArticles_15);
map.addLayer(layer_DigsArticles_15);
function pop_Places_16(feature, layer) {
layer.on({
mouseout: function(e) {
Expand Down Expand Up @@ -1083,7 +1125,7 @@
.title += 'Search for a place';
var overlaysTree = [
{label: '<img src="legend/Places_16.png" /> Places', layer: layer_Places_16},
{label: '<img src="legend/ArticlesDigs_15.png" /> Articles-Digs', layer: layer_ArticlesDigs_15},
{label: '<img src="legend/DigsArticles_15.png" /> Digs-Articles', layer: layer_DigsArticles_15},
{label: '<img src="legend/Pools_14.png" /> Pools', layer: layer_Pools_14},
{label: '<img src="legend/Shafts_13.png" /> Shafts', layer: layer_Shafts_13},
{label: '<img src="legend/Tunnels_12.png" /> Tunnels', layer: layer_Tunnels_12},
Expand Down Expand Up @@ -1178,12 +1220,12 @@
i++;
});
var i = 0;
layer_ArticlesDigs_15.eachLayer(function(layer) {
layer_DigsArticles_15.eachLayer(function(layer) {
var context = {
feature: layer.feature,
variables: {}
};
layer.bindTooltip((layer.feature.properties['English_Name'] !== null?String('<div style="color: #323232; font-size: 10pt; font-family: \'Open Sans\', sans-serif;">' + layer.feature.properties['English_Name']) + '</div>':''), {permanent: true, offset: [-0, -16], className: 'css_ArticlesDigs_15'});
layer.bindTooltip((layer.feature.properties['English_Name'] !== null?String('<div style="color: #323232; font-size: 10pt; font-family: \'Open Sans\', sans-serif;">' + layer.feature.properties['English_Name']) + '</div>':''), {permanent: true, offset: [-0, -16], className: 'css_DigsArticles_15'});
labels.push(layer);
totalMarkers += 1;
layer.added = true;
Expand All @@ -1203,15 +1245,15 @@
addLabel(layer, i);
i++;
});
resetLabels([layer_Estimatepath_9,layer_SiphonBridge_11,layer_Tunnels_12,layer_Shafts_13,layer_Pools_14,layer_ArticlesDigs_15,layer_Places_16]);
resetLabels([layer_Estimatepath_9,layer_SiphonBridge_11,layer_Tunnels_12,layer_Shafts_13,layer_Pools_14,layer_DigsArticles_15,layer_Places_16]);
map.on("zoomend", function(){
resetLabels([layer_Estimatepath_9,layer_SiphonBridge_11,layer_Tunnels_12,layer_Shafts_13,layer_Pools_14,layer_ArticlesDigs_15,layer_Places_16]);
resetLabels([layer_Estimatepath_9,layer_SiphonBridge_11,layer_Tunnels_12,layer_Shafts_13,layer_Pools_14,layer_DigsArticles_15,layer_Places_16]);
});
map.on("layeradd", function(){
resetLabels([layer_Estimatepath_9,layer_SiphonBridge_11,layer_Tunnels_12,layer_Shafts_13,layer_Pools_14,layer_ArticlesDigs_15,layer_Places_16]);
resetLabels([layer_Estimatepath_9,layer_SiphonBridge_11,layer_Tunnels_12,layer_Shafts_13,layer_Pools_14,layer_DigsArticles_15,layer_Places_16]);
});
map.on("layerremove", function(){
resetLabels([layer_Estimatepath_9,layer_SiphonBridge_11,layer_Tunnels_12,layer_Shafts_13,layer_Pools_14,layer_ArticlesDigs_15,layer_Places_16]);
resetLabels([layer_Estimatepath_9,layer_SiphonBridge_11,layer_Tunnels_12,layer_Shafts_13,layer_Pools_14,layer_DigsArticles_15,layer_Places_16]);
});
</script>
</body>
Expand Down
Loading

0 comments on commit fd3df65

Please sign in to comment.