Parking near 40.4395, -79.9503<\/p>ref: 777<\/span>","type":"parking"},{"parent":null,"id":776,"title":"Parking – Duck Hollow","lat":"40.414574320222","lng":"-79.916825294495","description":"Parking near 40.4146, -79.9168ref: 776<\/span>","type":"parking"},{"parent":null,"id":775,"title":"Parking near 40.4271, -79.9632","lat":"40.427120197716","lng":"-79.96323287487","description":"
Parking near 40.4271, -79.9632<\/p>ref: 775<\/span>","type":"parking"},{"parent":null,"id":774,"title":"Parking – South Side Riverfront Park","lat":"40.431718133243","lng":"-79.974530339241","description":"Parking near 40.4317, -79.9745 Parking near 40.4718, -79.9664<\/p>ref: 757<\/span>","type":"parking"},{"parent":null,"id":758,"title":"Parking near 40.4736, -79.9705","lat":"40.473638348187","lng":"-79.970464110374","description":" Parking near 40.4736, -79.9705<\/p>ref: 758<\/span>","type":"parking"},{"parent":null,"id":759,"title":"Parking – Millvale Riverfront Park","lat":"40.470771568563","lng":"-79.973505735397","description":"Parking near 40.4708, -79.9735ref: 759<\/span>","type":"parking"},{"parent":null,"id":760,"title":"Parking near 40.4646, -79.9764","lat":"40.464605027136","lng":"-79.976375699043","description":" Parking near 40.4646, -79.9764<\/p>ref: 760<\/span>","type":"parking"},{"parent":null,"id":761,"title":"Parking – River Ave. near Washington’s Landing","lat":"40.46091136093","lng":"-79.982389211655","description":"Parking near 40.4609, -79.9824ref: 761<\/span>","type":"parking"},{"parent":null,"id":762,"title":"Parking near 40.4531, -79.992","lat":"40.453062156132","lng":"-79.991996884346","description":" Parking near 40.4531, -79.992<\/p>ref: 762<\/span>","type":"parking"},{"parent":null,"id":763,"title":"Parking near 40.4509, -79.9956","lat":"40.450874174841","lng":"-79.995564222336","description":" Parking near 40.4509, -79.9956<\/p>ref: 763<\/span>","type":"parking"},{"parent":null,"id":764,"title":"Parking near 40.4473, -80.008","lat":"40.447289976936","lng":"-80.007966756821","description":" Parking near 40.4473, -80.008<\/p>ref: 764<\/span>","type":"parking"},{"parent":null,"id":765,"title":"Parking near 40.4482, -80.0098","lat":"40.448179920906","lng":"-80.009790658951","description":" Parking near 40.4482, -80.0098<\/p>ref: 765<\/span>","type":"parking"},{"parent":null,"id":766,"title":"Parking near 40.4464, -80.0134","lat":"40.446424515535","lng":"-80.013406276703","description":" Parking near 40.4464, -80.0134<\/p>ref: 766<\/span>","type":"parking"},{"parent":null,"id":767,"title":"Parking near 40.4544, -80.0338","lat":"40.454431649214","lng":"-80.033836662769","description":" Parking near 40.4544, -80.0338<\/p>ref: 767<\/span>","type":"parking"},{"parent":null,"id":768,"title":"Parking near 40.4612, -80.0355","lat":"40.461152169667","lng":"-80.035507678986","description":" Parking near 40.4612, -80.0355<\/p>ref: 768<\/span>","type":"parking"},{"parent":null,"id":769,"title":"Parking near 40.4721, -80.043","lat":"40.472089690266","lng":"-80.042996406555","description":" Parking near 40.4721, -80.043<\/p>ref: 769<\/span>","type":"parking"},{"parent":null,"id":770,"title":"Parking near 40.4403, -80.0176","lat":"40.440329228844","lng":"-80.017595887184","description":" Parking near 40.4403, -80.0176<\/p>ref: 770<\/span>","type":"parking"},{"parent":null,"id":771,"title":"Parking near 40.4334, -80.004","lat":"40.433433090865","lng":"-80.003997087479","description":" Parking near 40.4334, -80.004<\/p>ref: 771<\/span>","type":"parking"},{"parent":null,"id":772,"title":"Parking near 40.4357, -80.0081","lat":"40.435703300825","lng":"-80.008052587509","description":" Parking near 40.4357, -80.0081<\/p>ref: 772<\/span>","type":"parking"},{"parent":null,"id":773,"title":"Parking near 40.4321, -80.0015","lat":"40.432110127412","lng":"-80.001454353333","description":" Parking near 40.4321, -80.0015<\/p>ref: 773<\/span>","type":"parking"},{"parent":null,"id":724,"title":"Bathrooms at Point State Park","lat":"40.442139","lng":"-80.011999","description":"The bathrooms at Point State Park are located indoors and are ADA accessible.ref: 724<\/span>","type":"bathroom"},{"parent":null,"id":726,"title":"Bathroom near 40.4389, -79.9473","lat":"40.438863501457","lng":"-79.94725227356","description":" Bathroom near 40.4389, -79.9473<\/p>ref: 726<\/span>","type":"bathroom"},{"parent":null,"id":725,"title":"Bathroom near 40.4347, -79.9956","lat":"40.434747862089","lng":"-79.995585680008","description":" Bathroom near 40.4347, -79.9956<\/p>ref: 725<\/span>","type":"bathroom"},{"parent":null,"id":17738,"title":"Encroachment along Eliza Furnace Trail","lat":"40.43418","lng":"-79.99377","description":"Please be aware that the Eliza Furnace section of the Three Rivers Heritage Trail is experiencing encroachment from surrounding encampments. We ask that trail users use caution on this portion of trail. 17738<\/span>","type":"alert"},{"parent":null,"id":15416,"title":"South Side 2nd St. Trail Closure","lat":"40.430537","lng":"-79.998911","description":"The trail along 2nd Street in South Side is closed due to work to restore a historic building. Please follow detour signs in the area.
\r\n
\r\n
\r\n<\/div>ref: 774<\/span>","type":"parking"},{"parent":null,"id":756,"title":"Parking – Eliza Furnace Trailhead","lat":"40.426004354685","lng":"-79.953072667122","description":"Free parking. No overnight parking.ref: 756<\/span>","type":"parking"},{"parent":null,"id":757,"title":"Parking near 40.4718, -79.9664","lat":"40.47177954631","lng":"-79.96644616127","description":"
\r\n 15416<\/span>","type":"alert"}];
;
mymap.on("contextmenu", function (event) {
console.log("Coordinates: " + event.latlng.lng + " : " + event.latlng.lat);
});
// for(var i = 0; i < trails.length; i++){
// var rs = trails[i];
// points = rs.split(' ');
// var polylinePoints = [];
// for(var j = 0; j < points.length; j++){
// var tpos = points[j].split(':');
// if (tpos[0] != "" && tpos[1] != ""){
// polylinePoints[j] = new L.LatLng(tpos[0], tpos[1]-360);
// }
// }
// var polylineOptions = {
// color: '#ff0000',
// weight: 4.0,
// opacity: 0.8,
// };
// var road_polyline = new L.Polyline(polylinePoints, polylineOptions).addTo(mymap);
// roadpolygons_layer.addLayer(road_polyline);
// }
jQuery('#trail_sections_div ul > li').click(function(e) {
var id = jQuery(this).attr('id');
var post_id = id.split("_").pop();
jQuery('#trail_sections_div ul > li').removeClass('trail_section_selected');
jQuery(this).addClass('trail_section_selected');
// if(post_id == 17){
// mymap.flyTo([40.4368384, -79.9583244], 13);
// return;
// }
var trail_section_clicked = trail_sections.find(function(element) {
return element.id == post_id;
});
mymap.flyTo([trail_section_clicked.lat, trail_section_clicked.lng], trail_section_clicked.zoom_level);
jQuery('#trail_section_description').html(trail_section_clicked.description);
});
jQuery('#legend_bar ul > li').click(function(e) {
jQuery(this).toggleClass('legend_item_selected');
var types = [];
jQuery('#legend_bar ul > li').each(function(id,element){
if(jQuery(element).hasClass('legend_item_selected')){
types.push(jQuery(element).data('type'));
}
});
trail_markers_layer.setFilter(function(layer) {
return types.indexOf(layer.properties['type']) > -1;
});
});
function sub_addTrailMarker(place){
var icon_path = place.type + '.png';
var trail_marker = {
"type": 'Feature',
"geometry": {
"type" : 'Point',
"coordinates" : [parseFloat(place.lng), parseFloat(place.lat)]
},
"properties": {
"title" : place.title,
"description" : place.description,
"icon": {
"iconUrl" : "https://friendsoftheriverfront.org/wp-content/plugins/friends-of-the-riverfront/assets/icons/"+icon_path,
"iconSize" : [20, 26],
"iconAnchor": [10, 26]
},
"id" : place.id,
"name" : place.title,
"type" : place.type
}
};
return trail_marker;
}
var trail_markers_geojson = [];
trail_markers.forEach(function(marker){
trail_markers_geojson.push(sub_addTrailMarker(marker));
});
trail_markers_layer.on('layeradd', function(e){
var marker = e.layer, feature = marker.feature;
if (feature.properties.icon.iconUrl != ""){
marker.setIcon(L.icon(feature.properties.icon));
}
});
trail_markers_layer.setGeoJSON(trail_markers_geojson); // add features to the map.