perliedman / leaflet-realtime

Put realtime data on a Leaflet map
ISC License
737 stars 169 forks source link

Question about local data #156

Closed RuikunLi closed 4 years ago

RuikunLi commented 4 years ago

Hi there, got a question, is it possible to use the local JSON file as the source?

best, Ruikun

perliedman commented 4 years ago

Depends on what you mean by "local". If you mean "JSON loaded in the browser", then yes, just implement a custom source function, and return the local data you have. If you mean "file on the client's filesystem", then you still need some means to transport it to the browser.