Geographic Mapping Plugin



  • This is the beginning of a plugin for a map view for posts that have geo tags:

    https://github.com/automenta/nodebb-plugin-map

    A few questions before proceeding:

    How should post geographic data be stored? I'm considering a markdown tag like

    [[where <lat>,<lon>,<altitude>,<planet>]]
    

    or embedded JSON like:

    {where: [ 28.00, -23,44 ] }
    {where: { lat: 28.00, lon: -23,44 } }
    

    Embedded metadata like this can be processed by a server-side filter to add to a separate geoindex (for proximity searching), or it can be added directly to the post object when it's inserted into the database.


    This map is currently displayed as a popup (and could also be a widget) which can change its contents according to what categories/topics/posts are being visited. What is the best way to access the currently displayed objects to scan them for any geographic location metadata in order to plot them on a map?

    This set of objects might include users, other NodeBB servers, etc..

    Announcements   NodeBB.png


    My reason for making this plugin is to replicate the features in the software shown below, but using the NodeBB framework.

    Screenshot from 2014-05-24 10:57:38.png
    Screenshot from 2014-05-24 21:40:26.png



  • We (SeH and I) are looking to use NodeBB as a base for an interactive data viewer that combines Netention (created by SeH http://geekery.biz), ClimateViewer 3D ( created by me http://climateviewer.com/3D/) and Ushahidi (https://climateviewer.com/report/). THIS IS AN AMAZINGLY AMBITIOUS TASK, which will have huge implications for NodeBB.

    Climate-Viewer-3D-mapping-climate-change-pollution-privacy-google-earth.gif

    What's in it?

    What is needed:

    • Geolocation tags (click location on a popup map, add to BB post)
    • Time tag ( adjust time stamp of post, past or future. Example live USGS feed of earthquakes on a map, converted to BB posts. Ability to adjust map timeslider)
    • Metadata categories (youtube video url, image url, google doc, fusion tables, rss links)

    First steps:

    • Create plugin to place nodeBB posts on a Leaflet based 2D map, with feeds and categories of posts.
    • Next step: do the exact same thing with Cesium JS (webGL 3D globe) and create a 2D/3D toggle function, posts look identical in both views.
    • Final step: add additional view options for posts: timeline, trend chart, bubble map, output to PDF, etc.

    Anyone willing to help with our project would be greatly appreciated.



  • 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 want to create a humanitarian based mapping system, similar to Ushahidi, based on NodeBB.
    Purpose: track polluted places, connect users with goods to trade and barter, replace Google Crisis map, and so much more.

    Ushahidi is the only app out there currently doing this, Cesium is brand new, and there is no out-of-the-box crowd-sourced mapping solution.

    NodeBB will have the sexiest mapping system out there.



  • When you click on a map icon, it should show the BB post fullscreen, similar to Wordpress.

    When complete, the user should feel like their on a Wordpress site, using maps, charts, and timelines to navigate the "posts"

    SeH and I have been working on this idea for two years, dreading the thought of creating admin panels and such for the work we've already made at http://geekery.biz

    NodeBB gives us a chance to launch past all that and integrate what we've already created.

    I am a novice javascript programmer, SeH handles most of that. I handle UX/UI/CSS and some JS. We have a clear vision of what the project should entail, with the end result replacing Facebook, Google Maps, Twitter, Craiglist, and a few more. All of these functions could easily fit in a couple button clicks on NodeBB.



  • @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-map

    Now 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.



  • M 6.6 - 52km E of Buldir Island, Alaska   NodeBB.png

    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.



  • M 6.6 - 52km E of Buldir Island, Alaska   NodeBB (1).png

    button for adding geo metadata.

    updates here:
    https://github.com/automenta/nodebb-plugin-map

    will continue tomorrow.



  • @rezn8d I really like this idea. πŸ‘

    Really really impressive what you made - can we test it????? πŸ™‚


  • Admin

    Loving it so far. You guys figured out the hooks pretty fast, am looking forward to seeing progress πŸ‘



  • @rezn8d yes.. sexy map porn..



  • @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 πŸ™‚


  • GNU/Linux Admin

    @seh I was actually going to write a Leaflet plugin about a month ago, but got sidetracked. πŸ™‚

    Glad to see it happening.



  • @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.



  • @seh @julian Hello guys, just stumbled into this - could it come in handy for something?



  • Holy Shit, nevermind

    DL5PAUY.png



  • @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 πŸ˜„



Suggested Topics

  • 3
  • 13
  • 3
  • 1
  • 2
| |