Skip to content

Instantly share code, notes, and snippets.



Last active Dec 6, 2017
What would you like to do?
Simple Leaflet GeoServer Example
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="initial-scale=1,user-scalable=no,maximum-scale=1,width=device-width">
<title>Example Leaflet</title>
<link rel="stylesheet" href="">
body {
padding: 0;
margin: 0;
html, body, #map {
height: 100%;
<div id="map"></div>
<script src="//"></script>
var map = new L.Map('map', { center: new L.LatLng(-42.7946,147.2576), zoom: 11, attributionControl:true, zoomControl:false, minZoom:6});
var osmUrl='http://{s}{z}/{x}/{y}.png';
var osmAttrib='Map data © <a href="">OpenStreetMap</a> contributors';
var osm = new L.TileLayer(osmUrl, {minZoom: 8, maxZoom: 18, attribution: osmAttrib});
var wmsLayer= L.tileLayer.wms("", {
layers: 'GCC_cc:Stormwaterpipes',
format: 'image/png',
transparent: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment