Closed (fixed)
Project:
Leaflet
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Oct 2012 at 22:09 UTC
Updated:
25 Nov 2013 at 20:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dasjothe first patch (replacing addGeoJSON with addData) worked for me, thanks!
Comment #2
rballou commentedGoing to go ahead and change this to needs review.
Comment #3
dasjofor the at least the first patch is rbtc
Comment #4
7wonders commentedI am finding that anything and everything in geojson except for a single point, results in a grey screen. Related?
Comment #5
dasjo7wonders, yes - this should be fixed by the above patch. if not, open a separate issue and include the error log messages within your browser
Comment #6
7wonders commentedMy bad, linestrings do work but not with my admin acct for some reason (admin menu clash or something else I suspect). Will check out all the others and report back.
Comment #7
7wonders commentedThe point, linestring and polygon from the geojson-sample.js file all worked but the multipoly didnt. However, this one did.
Comment #8
levelos commentedComment #9
pvhee commentedAs a temporary fix, I've commited the first patch in #0.
However, as rballou correctly states, we need to pass in an onEachFeature function (from the docs: http://leafletjs.com/examples/geojson.html).
So, setting this issue back to "needs review" as in #2.
Comment #10
pvhee commentedComment #11
7wonders commentedSo is it the onEachFeature function that would allow for something such as displaying a linestring and a bunch of separate points with different markers along the linestring or is that already possible and im just missing something??
Comment #12
rballou commentedAs far as I remember, the features are collections of other geometries. The files I was working with bundled their information as features with various geometries. So if you GeoJSON uses features, you may not be able to get that to work with the Leaflet module without the second patch. That said I haven't done much with this in the last few months so I'm not sure if we need to re-roll or anything else to make this to work.
Comment #13
7wonders commentedHere is rballou's oneachfeaturechange patch for latest dev.
Comment #14
rballou commentedI just noticed there's a typo in this patch (the original patch), so I'm fixing that based on 7wonders patch in #13.
As a quick reminder, GeoJSON features do not work without this patch as the "featureparse" event does not exist anymore.
Comment #15
gcbThanks for this work! Rolled into dev and will be in a point release very soon.