- background map is not displayed
obviously, this official example uses mapBox's map. When configuring the accessToken of the map, you need to fill in the corresponding key. You go to mapBox's website to apply for one to fill in, and the map will come out. Or you can change to another online map as the base map
you need to apply for tocken, on the mapbox website and replace the accessToken in the code.
or try a different tile service
L.tileLayer ("http://t2.tianditu.cn/img_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=img&tileMatrixSet=w&TileMatrix={z}&TileRow={y}&TileCol={x}&style=default&format=tiles").addTo(map);
you can run it by copying the example directly from the official website.
at first glance, you did not fill in token. F12 see what's wrong with the next report
Previous: About the scope of JS function?
Next: How does js elegantly concatenate the date of time 1 and the time of time 2?
the picture in the picture is the current indoor distribution picture, using the imageOverlay in leaflet to add the base map, using the 4326 coordinate system, it is said on the Internet that the coordinate system is the wgs84 coordinate system, and th...