Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

150
Views
Add a table to popup using js

I'm just starting to study leaflet and I want to add a table to the marker as an experiment, I seem to do everything according to the rules, but the text that should be in the form of a table is output in plain text cell 1 cell2. I will be glad of any help. Thanks!

var map = L.map('map', {
    center: [10.0, 5.0],
    minZoom: 2,
    zoom: 2,
});

L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
    attribution:
        '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
    subdomains: ['a', 'b', 'c'],
}).addTo(map)

var popup = "<table><tr><td>Cell 1</td><td>Cell 2</td></tr></table>"
    var m = L.marker([51.30,0.07]).bindPopup(popup
    ).addTo(map);
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!