I’ve finally had a bit of time to work on the online users map block I wrote a while ago – the recent release of Moodle 2 being a bit of a spur. Two main changes I’ve made:
Firstly, I added the option to use either Google Maps or OpenStreetMap, with the default being OpenStreetMap, but you can easily change it in the block settings.
Secondly, I managed to get the block up and running in Moodle 2 (see it in action). It needed a few changes over the previous version to get it to work. I’m still having a few issues with getting the block to update the cron field in the mdl_blocks table – so currently you need to update the blocks table manually to enable the cron function, which automatically updates the user locations.
At the moment it’s fairly basic as I’ve only spent a few hours working on it, but seems to be working well. I’ve deliberately tried to keep the number of options and fields down to a minimum (I know there are far more options and functions I could add).
Enter some search text in the ‘What?’ field, then a location in the ‘Where?’, finally select ‘When?’. All the events matching your search (within a 50mile radius of the location) will be shown on the map. Click on the marker to get more info about the event.
Neither the ‘what?’ or ‘where?’ field are required, either or both may be left blank. If the ‘what?’ is omitted then all events in the area are shown and if the ‘where?’ is omitted then the centre of the current view of the map is used.
All the events are from Upcoming and you can use their interface to add your own event, to then appear on the map.
After a long time of not doing much (ok, any) development on my Moodle online users map block, I’ve finally had chance to return to the code to make the necessary changes for the block to run on Moodle 2.
It was always going to be tricky trying to maintain this block whilst in Ethiopia, not only with the slow internet connection, but the university firewall blocks many ports and this is my normal internet access point. So now that I’m temporarily back in the UK, I thought I’ve got chance to get back up to speed.
In the end only minor changes were needed to get the block running on Moodle 2. If you’re downloading the block from the Moodle modules & plugins pages, then please check you get the right one (v1.9 and earlier or v2) for your Moodle installation.
If you’re getting the code via CVS then HEAD currently contains the version for v2 and the MOODLE_19_STABLE branch has the version for 1.9 and earlier.
I’ve also set up a demonstration Moodle site so you can see the block in action. Just sign up, and you should see yourself marked on the Google map. You may have to wait until the location lookup script has run before you appear on the map, but this should only be a few minutes.
Please let me know if you have any problems with either getting the block to run on Moodle 2 or with the demonstration site.
When I was developing the MSG presence maps we also thought about how we could replace or enhance the BuddySpace custom maps – which give you an office plan and presence icons for who is in the office and where. The original BuddySpace maps worked well, but they were a pain to update when staff started or left – meaning it was often out of date.
As the MSG presence maps were using the Google Maps API, we thought about using a custom Google Map for the office plan. Unfortunately, it remained just a thought and we never got time/chance to actually implement anything.
Now what would be really good is combination of these 2 apps, so at a certain point of zooming in on a Google Map with the campus outline overlaid, you zoom down to the office plan for each building (would need to think about how to cope with different floors) adding in presence info from MSG. How about something like this for the OU campus?
Yesterday I went to the Google Developer Day in London and learned quite a lot of new ‘stuff’ about the APIs they are producing and what’s coming up in the future, so here’s a brief overview of the workshop sessions I attended… for info, videos of all the sessions are here: http://code.google.com/events/developerday/
Maps API workshop
In this workshop we developed a small maps application, most of which wasn’t that new to me – putting makers on a map, drawing lines etc – much of which I’ve done during the development of the MSG Presence Maps. But there were a couple of new things for me, firstly the driving directions – I hadn’t realised how easy it was to add these to a map or that they were available through the API (plus a text description of the route). Secondly, Google Mapplets, now you can develop a mapping application and combine it with other mapping applications (either porduced by you or other people) so, for example, you could use an estate agents mapplet to find houses in an area, and use a schools mapplet to find schools in the same area – these would all be overlayed on the same map, and you can add/create other mapplets as you like. (Mapplets info & demo).
Maps – new features
(lots of maps stuff for me today!) There was more mention/explanation here of the Mapplets, but I also found out some more things abotu the existing API that I didn’t know you could do. For example the overview map (small large scale map in bottom right of the main map – to give some context) – I’d not realised this was available through the API – so going to look at adding this to MSG Presence Maps. Similarly with the CustomControlArea – this might be a good place to put the MSG user search – in a box overlayed on the map – in fact maybe all the controls, eg group selection etc could go here? Also thought about making the mashup.jsp service from BuddyXML return KML which could then just be loaded driectly into the small ‘online users’ map in the MSG block.
All in all a very worthwhile day out & learned quite a lot (which didn’t go straight over my head – always a bonus). As always, it’s just now going to be getting the time (and have an actual application for) to try all of these things out 🙂
The MSG Presence Maps have now been launched live on the OpenLearn LearningSpace and LabSpace websites. This adds Google maps integration to the MSG block on both sites, allowing users to see where other users are located geographically. This also means that MSG is now available in LearningSpace – not just LabSpace, giving a much larger potential user base as the LearningSpace has approximately 10 times the hit rate of LabSpace!
Feedback is always welcome, especially on the new presence maps, so feel free to leave a comment here on my blog, or alternatively on the MSG Forum.
Been thinking more about what to ‘do’ about embedding Google maps into the MSG block in LabSpace and what should be shown depending on whether the user is currently logged in to LabSpace. Now we’re thinking that the map should be displayed whether or not the user is logged in and it should display markers for all of the currently logged in users.
As these users might not be in your contacts list we’d only be able to display the location, no presence, name or any other information – so we’d need to use another colour marker (I think) to indicate their presence/personal details are unavailable to you.
Any other suggestions/possibilities welcome as to how the embedded maps should function for logged in vs logged out users 😉