Архив

Архив Октябрь 2020
23 октября 2020 Нет комментариев

При ошибке Classic styles are no longer supported; see https://blog.mapbox.com/deprecating-studio-classic-styles-d8892ac38cb4 for more information
Заменить

L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}',{
	attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
	maxZoom:18,
	id:'mapbox.streets',
	accessToken:'YOUR_MAPBOX_ACCESS_TOKEN'
}).addTo(mymap);

на

L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}',{
	attribution: '© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/" target="_blank" rel="noopener noreferrer">Improve this map</a></strong>',
	tileSize:512,
	maxZoom:18,
	zoomOffset:-1,
	id:'mapbox/streets-v11',
	accessToken:'YOUR_MAPBOX_ACCESS_TOKEN'
}).addTo(mymap);
Categories: Javascript Tags:
19 октября 2020 Нет комментариев
$('.form_cabinet .photo input[type=file]').on('change',function(){
	var file=this.files[0];
	var reader=new FileReader();
	reader.onloadend=function(){
		$('.form_cabinet .photo .image').css('background-image','url("'+reader.result+'")');
	}
	if(file){
		reader.readAsDataURL(file);
	}
});
Categories: Javascript Tags: