Geographic Mapping Plugin
-
@nik said:
I'm totally impressed by this endeavour as it's something not far from what I've been contemplating for a while. Let me know when you get started and will try to contribute
I'm new to writing NodeBB plugins. I started today and experimenting here:
https://github.com/automenta/nodebb-plugin-webin
https://github.com/automenta/nodebb-plugin-mapNow that it loads leaflet.js I'm trying to find the best way to embed and retrieve metadata (including geolocations or GeoJSON data) in posts. We want to display individual maps for posts and also combined maps for collections of posts: all posts in a topic, all posts in a category, etc...
@nik if you have any NodeBB development experience, it would be helpful to know what you can suggest.
-
@seh add input box on posts that allows you to drop lat/lon coordinates in text format, or click on a map to set location.
Possibly right or left click on map to create new post. Follow the Netention format we have already.
Ideally, each post should be able to have a "featured image" similar to Wordpress, that way map marker icons can use that image, and when you click the icon the BB post will have a header image.
We are looking for Wordpress style articles inside map markers, all open-source.
-
for displaying an inline map:
so far it detects an embedded JSON code in the post and if it exists, creates a leaflet map with the coordinates. this reminds me of wordpress shortcodes.in the screenshot, the post was created by the WebIn plugin from a USGS GeoRSS feed.
-
Loving it so far. You guys figured out the hooks pretty fast, am looking forward to seeing progress
-
@Giorgio-Chiodi said:
@rezn8d I really like this idea.
Really really impressive what you made - can we test it?????
the map stuff isn't anywhere near finished. i might be able to get back to it today. but if you want to see what it does so far, can you install the module from git?
this might work, from your nodeBB directory:
npm i automenta/nodebb-plugin-map
and
npm i automenta/nodebb-plugin-webin
let me know if you run into any trouble.
-
@psychobunny the map stuff is mostly jquery rewriting the client dynamically. not sure if this is a good way to do it - the theme's HTML structure might change at some point and it will not know what to manipulate. anyway it works for now
-
@seh A problem I see with the webin plugin is that it cannot currently refresh more often than 1 minute. I understand this is a limitation of chron, but we should already start looking at a way to push content in real time or with little delay.
-
Holy Shit, nevermind
-
@Giorgio-Chiodi said:
@seh A problem I see with the webin plugin is that it cannot currently refresh more often than 1 minute. I understand this is a limitation of chron, but we should already start looking at a way to push content in real time or with little delay.
refresh sooner than once a minute? that could be done with an ordinary setInterval( ). i suppose the advantage of cron is that the job can be seen / managed from beyond the plugin.
for realtime data sharing, RSS is not ideal because it is based on polling. better is something like pubsubhub which pushes data to you when it updates.
but RSS is rather ubiquitous on the web, and it's better than nothing.
-
@Giorgio-Chiodi said:
@seh @julian Hello guys, just stumbled into this - could it come in handy for something?
not really, that's the same functionality i'm hoping the maps + the other plugins will be able to make possible in NodeBB. without involving hosted service