Posts with the Leaflet tag

How to add titles to a layer control box in a Leaflet map in R

GIS R Leaflet

28 May, 2021

– Leaflet's layer control boxes allow you to select, show or hide different layers. But there's no default parameter to supply a title to the box. Fortunately this is an easy fix in R with a bit of JavaScript.



Leaflet maps in Django with model-backed geoJSON data

Python Django GIS Leaflet geojson

2 December, 2020 (updated 9 April, 2021)

– We can create Leaflet maps with simple location data, using only the default Django models and a home-made geoJSON serialiser. Let's avoid bloated geographical libraries and see how lightweight we can get our maps to be.



Click to zoom in on polygon in Leaflet maps with Shiny

GIS Shiny R Leaflet

12 July, 2020

– An easy way to add further interactivity to Leaflet maps rendered in R Shiny apps is to enable zoom-to-point functionality for your polygons. There currently isn't an out-of-the-box solution for this, but it's pretty easy ...