Skip to content

Instantly share code, notes, and snippets.

Last active January 4, 2023 13:42
What would you like to do?
Leaflet WFS
<!DOCTYPE html>
<head lang="en">
<meta charset="UTF-8">
<link rel="stylesheet" href="" integrity="sha256-kLaT2GOSpHechhsozzB+flnD+zUyjE2LlfWPgU04xyI=" crossorigin="" />
<!-- <link rel="stylesheet" href="" /> -->
#map {
margin: 0;
height: 100%;
width: 100%;
<div id="map"></div>
<!-- <script src=""></script> -->
<script src="" integrity="sha256-WBkoXOwTeyKclOHuWtc+i2uENFpDZ9YPdf5Hf+D7ewM=" crossorigin=""></script>
<script src=""></script>
<script src=""></script>
<script src=""></script>
var map ='map').setView([43.457818, -80.0298962], 12);
// add an OpenStreetMap tile layer
L.tileLayer('http://{s}{z}/{x}/{y}.png', {
attribution: '&copy; <a href="">OpenStreetMap</a> contributors'
var objWfst = {
url: '',
typeNS: 'osm',
typeName: 'water_areas',
crs: L.CRS.EPSG3857,
geometryField: 'the_geom',
filter: new L.Filter.BBox('the_geom', map.getBounds(), L.CRS.EPSG3857),
style: {
color: 'blue',
weight: 2
var wfst = new L.WFST(objWfst).addTo(map);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment