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

235
Views
Would it be possible to create a "read more" button inside a Leaflet Marker Popup?

I'm currently working on a small project of mine. I've a map showcasing a few markers on them. It works so far, but i would like to be able to design a "show more" option on the markers pop-up to avoid bloating it with text and data.

Here's the marker's popup code:

let marker = L.marker([rivers[1].gps_latitude, rivers[1].gps_longitude]).addTo(map)
                marker.bindPopup("<b> Name:</b> " + rivers[1].name
                    + "<br><b> Latitude:</b> " + rivers[1].gps_latitude
                    + "<br><b> Longitude:</b> " + rivers[1].gps_longitude)

Would it be possible to create a "Read more" button that hide anything but the name variable fo the marker ? And only show Latitude and Longitude if you click on it ? I know how to create such things within a regular HTML page, but i've no idea how to implement it right into a pop-up.

Thanks for the help !

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!