How to debug problem reading geojson file #267
-
I am trying to work out how to get this plugin to draw the contents of a GeoJson file. Whatever I try, my map only ever looks like this: My Markdown file
My
{
"type": "Feature",
"properties": {
"title": "Jackson Road Extension",
"description": "Extension of US 66 in 1937, upon completion of land reclamation for 1937 Chicago World's Fair",
"stroke": "#ff0000",
"stroke-width": 3
},
"geometry": {
"type": "LineString",
"coordinates": [
[
-87.617232,
41.8784146,
0
],
[
-87.6243238,
41.8783107,
0
]
]
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 13 replies
-
Hmm, a GeoJSON file shouldnt prevent map tiles from loading. What version of the plugin are you on and are there any console errors? |
Beta Was this translation helpful? Give feedback.
-
In an earlier version of the markdown file, there was this line
instead of
So I can definitely understand why that didn't work.... What I cannot figure out is how to see any error messages associated with the plugin's parsing of data. The Obsidian 0.13.15 console has this: |
Beta Was this translation helpful? Give feedback.
-
I turned my computer off now, but playing with this file on my iPad, I noticed that I had a marker at latitude +87, but the map was entered on latitude -87 - either way, there's lots of white background, which may have made it look like the map didn't load! I think it's likely that when I copied the coordinates form the geojson file, I didn't notice that the list and long may have been the other way round... So there's a reasonable chance that this is user error, or user not yet knowing... I'll test it out tomorrow and let you know... The bit in my question about "how could I debug this?" is still valid, though, I think... |
Beta Was this translation helpful? Give feedback.
-
Yeah, tested on iPad and got it working... So the error was in my coordinates in the markdown leaflet block, as I mentioned in the message above. With this Markdown, it works fine and loads the line from the geojson posted above...
So sorry for the red herring, but I spent hours on this before asking the question here, so having a way to track down errors like this would be really, really helpful. even if just more info in the verbose output, like the lat+long of the bounding box displayed, and any similar information... If I'd seen that my coords were different ways round, I'd have spotted the problem sooner, I suspect. Anyways, thanks again for this awesome plugin! |
Beta Was this translation helpful? Give feedback.
Yeah, tested on iPad and got it working... So the error was in my coordinates in the markdown leaflet block, as I mentioned in the message above.
With this Markdown, it works fine and loads the line from the geojson posted above...
So sorry for the red herring, but I spent hours on this before asking the question here, so having a way to track down errors like this would be really, really helpful. even if j…