Hot answers tagged

2

If you want to use projection other than EPSG:3857 or EPSG:4326 in Leaflet, you have to use Proj4Leaflet plugin (see https://github.com/kartena/Proj4Leaflet) to define your projection. Leaflet allows only one CRS per map, so if your base map CRS is in EPSG:3857, you have to convert GeojSON coordinates from GeoJSON CRS (in your case that's non standard, ...


2

When you click, you call the function chart. Within this function you get the data from clicked feature e.g var feature = d.feature; var data = feature.properties.data; Then you set the div to prepare height and width for the chart and instanciate a svg element The code with var x = ... helps to calculate the width of each bar in the diagram by ...


1

The CSV parser from omnivore expects by default comma separated fields with headers. These headers should contains columns named longitude and latitude. You may need to set the options to correctly read the CSV depending of the CSV source like below. omnivore.csv('data/lieux_culture_nantes.csv', { latfield: 'mylatitudefield', lonfield: '...


1

There's a missing "}" that is causing the error message, your initMap() function is not properly closed.


1

This is a javascript problem regarding object property accessors. So when you're doing this... popupContent += feature.properties + '.' + headers[h]; What you want is to access e.g. feature.properties.iata when headers[h] has the value "iata". And it's failing, because the code is doing string concatenation instead. The approach here is to read and re-...


Only top voted, non community-wiki answers of a minimum length are eligible