perrygeo / leaflet-simple-csv Goto Github PK
View Code? Open in Web Editor NEWPut points on a map. CSV-driven, clustered, mobile-ready, filterable.
Put points on a map. CSV-driven, clustered, mobile-ready, filterable.
Hello Matthew, I've created a map for my site based on the script - it is so nearly there but there's a strange problem with custom icons and popups. Here's the demo:
http://www.megalithic.co.uk/leaflet_megalith_map.php?country=3
If I search for something in the text search box - below the 'Scotland' drop down. (try Well)
But click on Search. Then all the map icons disappear and when you click on a popup it says 'undefined'
But then click on Search again and the icons come back and also the popups come back!
I can't work it out... :(
Many thanks for a fab script and if you can help with this silly problem.
How it works:
The app code with the added customisation is here
www.megalithic.co.uk/leaflet/app.js
My CSV file with icons is here
http://www.megalithic.co.uk/cache/csvmap_country3.csv
There's a column called Icon which contains the name of the custom icon - eg tr2 creates a link to the icon wanted for that row, eg
http://www.megalithic.co.uk/images/mapic/tr2.gif
etc...
There's also a column called Thumb which has a thumbnail image for that pop-up - this all works fine.
You're welcome to add the custom icons / thumbnail idea to your base code if you like
Thanks
Andy
http://www.megalithic.co.uk
Non profit ancient sites web resource
Now, the map will not be displayed from the example.
@perrygeo really like the template, even after 3 years it seems to be one of the most simple ways of searching and filtering CSV data within leaflet.
The only issue i'm having with it is implementing it with Leaflet 1.0, are there any plans to update this template?
Everything works great! Thank for you for consolidating code together, providing simple instructions, and a working example. I accessed the map on many different types of mobile devices (iPad mini, Gen 1 and Nexus 7 Tablet) without any problems -- except an iPhone 4s. The marker pop-ups did not always display and sort of flickered. Any thoughts? I have read a few posts describing similar symptoms. If I find anything or make any successful edits I will let you know. I will be blogging about the plugin shortly at: http://opensourcegisblog.blogspot.com/2014/08/an-introduction-to-leaflet-part-i-csvs.html
Thanks, Jon
Hello. I tried:
— download zip-file from "leaflet-simple-csv";
— clone according to the readme instructions;
— clone and download zip;
But whatever i have 'Error retrieving csv file'.
The template on my github https://github.com/dasistglitch/map
Hi,
marker-icon-2x.png
which simply doubles the original icon is "needed" by retina displays. You can get it from my commit resolving this issue in my maps..
You'r template is awesome. I'm just asking if it's possible to add the possibility to have google map/mixte/sat as background. Because I need to have more zoom that I can had in map quest.
Regards
Thanks for the template. I was able to use a csv file with the pipe separator with an equivalent number of columns and lat and lng in the same positions as your example; With a larger number of columns and a reordered sequence of lat and lng, it is not working though. Any suggestions will be appreciated. Thanks.
Hi! I followed the usage instructions and opened index.html in firefox and saw this in firebug "ReferenceError: L is not defined". The screen is empty except a search box in the upper right corner. Did I miss something? Thanks!
Hi,
I am trying to add markers in a map reading from a CSV file but I do not succeed. I think the code is reading the CSV file because the message "No se pudieron cargar los datos" does not appear. However, although I can see the map the markers don't appear.
http://jsfiddle.net/t5L7j3s7/2/
Could you help me, please?
Laia
Hi and I want to say amazing work!
I created a simple page to monitor earthquake in Italy, and the csv file that I use on it is working with the map on your project.
Do you know how can I integrate the map of your code with the crossfilter library, do you think it's possible ?
thanks anyway
Luciano
Hello, I would like to use this great template for a offline App. I got a problem, though: everything is working great if leaflet.js is included from the CDN like in your demo. If I include the same, identical code from a local folder, it breaks the marker-clustering and the marker don't show up.
Any ideas how I could resolve this?
Thanks, Ralf
Hi all,
I'm facing some problem reading the cvs file; I rename the config.s.template in config.js and I'm testing with the data.cv file included in the original project but I got the following error:
"Error retrieving csv file" that seems to depend on a "requested page not found [404]" error.
Do you have any idea that could help me to figure out what I'm missing?
Thanks in advance.
Hi,
I think some items are self-explanatory, but some not. For example, var subdomains
. Can you provide some documentation (Javascript comments are enough) for that?
Thanks in advance,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.