Change map layer

Hi all,
I would like to give the possibility to change the map layer to user, but I do not know how to do it.
I create a map in mymap div and then give the instruction

				L.tileLayer("{id}/tiles/{z}/{x}/{y}?access_token="+token, {
					maxZoom: 18,
					attribution: "Map data © OpenStreetMap contributors,KeyFor",
					id: "mapbox/satellite-streets-v12",
					tileSize: 512,
					zoomOffset: -1

I think that I have to change on fly the row

id: "mapbox/with_map_I_whant"

but I think again that is wrong!!
How can I change map on fly?
Best regards and cheers


2 posts - 2 participants

Read full topic

Ce sujet de discussion accompagne la publication sur