Very new to Leaflet, but learning fast. In the following code example, where/how would I define maxHeight to get the scrollbar in popup for data?

var map = L.map('map', {
    center: [40.75, -74.15],
    zoom: 13

var osmAttrib = 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors';

var osm = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
    maxZoom: 18,
    attribution: osmAttrib

var cities = new L.LayerGroup([
    L.marker([40.72801, -74.07772]).bindPopup('Jersey City')

    [[40.712216, -74.22655], [40.773941, -74.12544]], {
    opacity: 1
}).addTo(map).bindPopup("This is a yellow box");

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.