This is a project I undertook to learn Meteor.
I had previously build a site with much of the same functionality using Express.
Needless to say, that took way more effort and has many more lines of code. That project can be seen at https://github.com/maxpleaner/marktplatz.
This now has an accompanying tutorial at https://medium.com/@maxpleaner/meteor-tutorial-plotting-online-users-on-a-map-adf3c3d1ebc6
In summary, when a User signs in, they see themself and all other signed in users plotted on a map.
- It has Meteor's accounts system, which I didn't have to write much code for.
- It uses the mizzao:meteor-user-status package to publish a list of online users to the client.
- It uses the dburles:google-maps and mdg:geolocation packages to geolocate users and plot them on a map.
I Google stuff so frequently that I can't give thanks to all the tutorials and stackoverflow questions that helpers me.
These resources were particularly useful, though:
- reactive-geolocation-with-google-maps/
- reactivity-basics-meteors-magic-demystified/
- custom-fields-on-meteor-users-not-being-published
- meteor-methods-client-side-operations/
- meteor-google-maps
Clone the repo and meteor run
.
There are just four files in here. Not so intimating, right?