I have a webpage with a Leaflet Map, I can add markers,filter markers and so on. My question is that how can I save it?

  1. Load the Map
  2. Add some Markers on the Map
  3. (Optional) Filter the Markers on the Map
  4. Save the map together with the Markers that put on the map in a database(any possible storage)
  5. Opening the map in the browser and view same as what i just saved.

I've search everything but its too hard to do it any possible suggestions?

  • 1
    Do you want to save the code? The map as image or other?
    – doktoreas
    Commented Oct 19, 2014 at 5:42
  • sorry for the late reply because of busy sched, iwant to save it as it is, internet is on, put markers on map and save it(i dont know what type of file but i hope it can be saved in mysql) and open it in web browser. same as it is working map with the same position of markers. i dont think its image because i want to zoom the map as same as first Commented Oct 20, 2014 at 14:02

1 Answer 1


You can save your marker positions , your current map view coordinates etc.. into the localstorage of the browser . Localstorage is supported by nearly all modern browsers , you can check availability of local storage here .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.