I want to web map some historical cyclones data which are now in KML files, file/year. So I want the user to select a year from a button and the KML files will be displayed on interactive map).

I started with openlayers and leaflet libraries but as I am beginner in JS as first impression it seems a bit complected to manage different events.

What is the best way to represent these data and what the different components I need?


Leaflet is certainly a good option, out of the box leaflet does not support kml but if you add a plugin like omnivore you should be able to get things work reasonably simply. Perhaps have a shot and post your code to jsfiddle if you get stuck then someone can provide more assistance.

  • what about the data, do I need to setup a Geoserver? I want the user to select the desired year of cyclone from a drop-down menu and the track will be displayed on the map. – Tikfa May 3 '15 at 12:07
  • No you do not need Geoserver if you are just wanting to display data from a bunch of kml files. Depening on what you are trying to build Geoserver might be a more long lasting scalable solution but if you're just playing around then kml's should be fine – rowanwins May 4 '15 at 1:12
  • I have hundreds of kml files/year! I want the user to select a date (year) and the corresponding kml will be displayed. I don't know what is the structure to retrieve my data by selecting from a drop-down menu. – Tikfa May 4 '15 at 15:44
  • In that case you'd be better off working out how to transfer that kml data into something like postgis. You could do that using ogr2ogr gdal.org/ogr2ogr.html . Once its in postgis you're able to serve it out much more effectively than individual files. – rowanwins May 5 '15 at 2:58

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