Javascript 将Nexrad雷达添加到地图
我正试图添加雷达nexrad地图与这些是我的代码。 添加这些代码后,我在地图上什么也看不到 我的网站:Javascript 将Nexrad雷达添加到地图,javascript,leaflet,Javascript,Leaflet,我正试图添加雷达nexrad地图与这些是我的代码。 添加这些代码后,我在地图上什么也看不到 我的网站: 如果您花一点时间浏览浏览器,您将能够看到WMS服务器正在回复XML消息,其中包含在LAYERS参数中给定的字符串无效层。。好的,但是我在google上搜索的层应该是什么呢。rasterPal,从上的WMS教程开始。 L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={access
如果您花一点时间浏览浏览器,您将能够看到WMS服务器正在回复XML消息,其中包含在LAYERS参数中给定的字符串
无效层。
。好的,但是我在google上搜索的层应该是什么呢。rasterPal,从上的WMS教程开始。
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', {
attribution: '© severestormsmedia.com',
maxZoom: 4.1,
id: 'mapbox/dark-v10',
tileSize: 512,
zoomOffset: -1,
accessToken: 'pk.eyJ1Ijoiam9leWNyZWF0b3IiLCJhIjoiY2tva253dHRxMDFhMzJubzF0NmNidTV1byJ9.fuQQQ11Nb0tnr-jbWemOsQ'
}).addTo(mymap);
var subs = ["mesonet", "mesonet1", "mesonet2", "mesonet3"];
var nexrad = L.tileLayer.wms("https://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0q.cgi", {
layers: 'nexrad-n0r-900913',
format: 'image/png',
transparent: false,
attribution: "Weather data © 2012 IEM Nexrad"
}).addTo(mymap);```