// LAYER: fotos

	// CREATE LAYER
			function pop_fotos(feature, layer) {
// markerdirection = feature.properties['$GPSImgDirection'];	
				layer.on({
					mouseout: function(e) {
						for (i in e.target._eventParents) {
							e.target._eventParents[i].resetStyle(e.target);
						}
					},
					mouseover: highlightFeature,
				});
				var popupContent = '<table BORDER="0" STYLE="padding:0;margin:0";border-spacing: 0;>\
						<tr STYLE="padding:0;margin:0">\
							<td STYLE="background:#fff;padding:0px;"><img style="width:auto;height:auto;max-width:100%;margin:0;" src="' + rsrglayer_fotos_path + '/' + feature.properties['Name'] + '" alt="' + feature.properties['Name'] +'" width="500" height="600"></td>\
						</tr>\
						<tr STYLE="padding:0;margin:0">\
							<td STYLE="background:black;padding:5px;text-align:center;"><a  STYLE="color:#fff;" TARGET="_blank" href="' + rsrglayer_fotos_path + '/' + feature.properties['Name'] + '">' + feature.properties['Name'] +'</a></td>\
						</tr>\
						<tr STYLE="padding:0;margin:0">\
							<td STYLE="background:black;padding:5px;text-align:center;color:#fff;">Direction:' +  feature.properties['Direction'] + '</a></td>\
						</tr>\
					</table>';
				layer.bindPopup(popupContent, {maxHeight: 400});
			}
			

	//		function style_fotos() {
	//			return {
	//				pane: 'pane_fotos',
	//				radius: 8.0,
	//				opacity: 1,
	//				color: 'rgba(255,255,255,1.0)',
	//				dashArray: '',
	//				lineCap: 'butt',
	//				lineJoin: 'miter',
	//				weight: 1.0,
	//				fill: true,
	//				fillOpacity: 1,
	//				fillColor: 'rgba(255,0,0,0.6)',
	//				interactive: true,
	//			}
	//		}
			
function style_fotos(feature) {
	return {
		pane: 'pane_fotos',
		// rotationAngle: markerdirection,
		rotationAngle: feature.properties['Direction']-90,
		rotationOrigin: 'center center',
		icon: L.icon({
			iconUrl: 'markers/sign-out-alt.svg',
			iconSize: [25.0, 25.0]
}),
		interactive: true,
	}
}			
			
			
			map.createPane('pane_fotos');
			map.getPane('pane_fotos').style.zIndex = rsrglayer_fotos;
			map.getPane('pane_fotos').style['mix-blend-mode'] = 'normal';
			
// var markerdirection;			
			
			var layer_fotos = new L.geoJson(json_fotos, {
				attribution: '',
				interactive: true,
				dataVar: 'json_fotos',
				layerName: 'layer_fotos',
				pane: 'pane_fotos',
				onEachFeature: pop_fotos,
				pointToLayer: function (feature, latlng) {
					var context = {
						feature: feature,
						variables: {}
					};
				//	return L.circleMarker(latlng, style_fotos(feature));
					return L.marker(latlng, style_fotos(feature) );
				},
			});
			
			
			bounds_group.addLayer(layer_fotos);
			map.addLayer(layer_fotos);
			
			
			
			L.control.layers(baseMaps,{
				[rsrglayer_fotos_title]: layer_fotos,
				},{collapsed:false}).addTo(map);