Skip to Content
Practical GIS
book

Practical GIS

by Gábor Farkas
June 2017
Beginner
428 pages
10h 2m
English
Packt Publishing
Content preview from Practical GIS

Styling vectors in Leaflet

As we can see, Leaflet represents vector points with marker images, while it draws lines and polygons just like QGIS does. The next thing we should learn is how we can customize the styles of the vector features we display in our web maps. Both the L.wfs and L.geoJson.ajax functions accept additional styling parameters we provide. Styling is done by passing a style object to the vector layer's function containing supported styling parameters. The complete list of parameters can be seen on the base vector class's API documentation page: http://leafletjs.com/reference-1.0.3.html#path. Using the properte provided list, let's change our polygons to better match the suitability maps we created in QGIS:

  1. Edit the map.js ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

GIS For Dummies®

GIS For Dummies®

Michael N. DeMers
Advanced Surveying: Total Station, GIS and Remote Sensing

Advanced Surveying: Total Station, GIS and Remote Sensing

Satheesh Gopi, R. Sathikumar, N. Madhu
GIS, 2nd Edition

GIS, 2nd Edition

Patrick McHaffie, Sungsoon Hwang, Cassie Follett

Publisher Resources

ISBN: 9781787123328Supplemental Content