Olá, eu gostaria de exibir um mapa básico de Brno no formato wms no leaflet. Estou tentando seguir a documentação, mas tenho um problema com a exibição dos dados desta camada.<\/P>
https:\/\/gis.brno.cz\/arcgis\/rest\/services\/PUBLIC\/basemap_brno_zakladni_mapa_seda_tiled\/MapServer<\/A> <\/P> <\/P> <\/P> <\/P> const map = L.map('map').setView([49, 16.5], 10); var wmsLayer = L.tileLayer.wms('https:\/\/gis.brno.cz\/arcgis\/services\/PUBLIC\/basemap_brno_zakladni_mapa_seda_tiled\/MapServer\/WMSServer?', { layers: "0", format: 'image\/png32', }).addTo(map);<\/code><\/pre> <\/P> <\/P> <\/P> <\/P> <\/P> <\/P> <\/P>
<\/P>
const map = L.map('map').setView([49, 16.5], 10); var wmsLayer = L.tileLayer.wms('https:\/\/gis.brno.cz\/arcgis\/services\/PUBLIC\/basemap_brno_zakladni_mapa_seda_tiled\/MapServer\/WMSServer?', { layers: "0", format: 'image\/png32', }).addTo(map);<\/code><\/pre> <\/P> <\/P> <\/P> <\/P> <\/P> <\/P> <\/P>
Hi, thank you for the question.
Did you know you can use Esri Leaflet to add this layer to your Leaflet map directly. Use L.esri.DynamicMapLayer. Example here: https://jsbin.com/femehah/3/edit?html,output
L.esri.dynamicMapLayer({ url: 'https://gis.brno.cz/arcgis/rest/services/PUBLIC/basemap_brno_zakladni_mapa_seda_tiled/MapServer' }) .addTo(map);
I hope this helps!
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.