Get GeoJson File as Object
See original GitHub issueDear Team,
Loved to use use your package so far. I found myself with a GeoJson problem.
I use a regular form to upload a GeoJson file. No big deal. Problem is to get this file and use it to generate the map on Leaflet.
Template.mapDropdown.events({
"change #mapFilesDropDown": function(event, template){
event.preventDefault();
console.log(event.target.value);
var mapId = event.target.value;
var myMap = Maps.findOne(mapId);
console.log(myMap.path);
}
});
This event get the File _id to return the selected GeoJson file. MyMap.path gives me the absolute path (assets/app/uploads/Maps/dnHkQkceumTKmLGSR.geojson), but I cant reach it…
How do I get the GeoJson file as a Json Object?, and use this object to generate my leaflet map? (this one is on me 😄 )
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
How to create JSON file from GeoJSON - GIS Stack Exchange
You can save GeoJSON data to a file with a .json extension. You can also encode the GeoJSON data to get a string...
Read more >How can I parse GeoJSON with Python - Stack Overflow
You can read it with json import, and file open: import json with open(path) as f: data = json.load(f) for feature in data['features']: ......
Read more >Draw and Edit with GeoJson.io - Hands-On Data Visualization
GeoJson.io lets you create geospatial files from scratch by using simple drawing tools to place points, polylines, or polygons on the map. These...
Read more >Using GeoJSON with Leaflet
A GeoJSON object may represent a region of space (a Geometry), a spatially bounded entity (a Feature), or a list of Features (a...
Read more >GeoJSON—ArcGIS Online Help | Documentation
GeoJSON is an open standard geospatial data interchange format that represents simple geographic features and their nonspatial attributes.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I solved by setting a downloadRoute
Thanks for your time and great work,
Thanks for the fast response!!
.link() gave me:
I am on development env. Am I supposed to use that on production? Thanks again