Leaflet WMS

base on http://leafletjs.com/examples/quick-start.html

by Thibault Coupin

HTML

<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css">
<script src="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js"></script>
<div id="map" class="map"></div>

CSS

.map {
  height: 400px;
  width: 100%;
}

JavaScript

var map = L.map('map').setView([48.845,2.424], 10);

L.tileLayer('http://a.tile.openstreetmap.org//{z}/{x}/{y}.png', {
    attribution: 'Map Quest &copy;',
    maxZoom: 18,
}).addTo(map);

L.tileLayer.wms("http://wxs.ign.fr/wnow33wqimoktpt0unhgwo0m/inspire/v/wms", {
    layers: 'BU.Building,TN.RoadTransportNetwork,TN.RailTransportNetwork,AD.Address',
    format: 'image/png',
    transparent: true,
    attribution: "IGN ©"
}).addTo(map);