I am trying to load data for a Marker from a csv file and I am using the GeoCSV plugin for that.
I downloaded the js file and added it to my code and also created a csv file in Excel which looks like this:
The resulting csv file:
lat;lng;title
52;8;test
8;52;test2
;;
;;
;;
;;
;;
But the two markers dont appear on the map. I think this is because of how I try to load in and add the data. I tried using the default example from github and also experimented with the linked examples from github.
My current code:
(function() {
'use strict';
var map = L.map('mapContainer');
$.get('test.csv', function(csvContents) {
var geoLayer = L.geoCsv(csvContents, {firstLineTitles: true, fieldSeparator: ','});
map.addLayer(geoLayer);
});
});
fieldSeparator: ','
tofieldSeparator: ';'
.