Posts tagged ‘maps’

Updates to Online Users Map

Online Users Map with OpenStreetMap

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.

Any feedback welcome 🙂

Event mapping

eventmapAfter a little time away from programming and active web development, I thought I’d get back into things by giving myself a little project to create a Google maps and Upcoming mashup.

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.

For the technically minded, the site uses the Google Maps API (including for geocoding the location) and the Upcoming API.

If you know of any other feeds I could use for adding events to the map, then please let me know so I can try adding them.

I’d also be grateful for any feedback, problems or suggestions – just leave a comment below.

Online Users Map for Moodle 2

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

In case you’re wondering where I am…

Custom Google Maps & office plans

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.

What reminded me of all this was a posting on the excellent Google Maps Mania blog about a couple of applications using custom Google Maps. The first is a map of the UCL campus, with the buildings overlaid – I really like the option of setting the transparency of the overlay. And the second is an office plan from LaudonTech.

UCL Campus Map:
UCL campus map

Office plan:

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?

Google Maps presentation

This morning I gave a little presentation about Google Maps at the IET Technology Coffee Morning. It’s a very quick look at some different things you can do with Google Maps…

(update: unfortunately the embedded links don’t seem to have come though on the slideshare version :-/ so you can download the original ppt)

Google Developer Day 2007 – Google Gears & Mapplets API

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

Google Gears
This seems to have been mentioned everywhere else in the last few days – so should mention it here too 😉 Essentially it’s an open source browser plugin to allow you to continue to use web applications even when you’re offline – giving seamless experience between on/off-line. There’s plenty more info about it around. It was very interesting to see the WorkerPool – which provides thread-like ability for JavaScript – preventing your browser freezing up whilst some long winded JavaScript is running. I was slightly unconvinced though by their reasoning behind not dealing with synchronisation conflicts (where two people update the same data whilst offline and then try to sychnronise their changes back), in saying that this was for the application to deal with – I know it’s a hard problem (maybe impossible to create totally automatic synchronisation conflict resolution?) but I feel conflicts should be highlighted by the synchronisation engine – not the application (as other db synchronisation managers do).

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 🙂

MSG Presence Maps Launched

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.

Maps demo video

I’ve created short demonstration video of the features in MSG Presence Maps – you can view the YouTube version below, or for a higher quality version please visit http://kmi.open.ac.uk/projects/osc/screencasts/msg-maps-demo/

Embedding MSG maps in LabSpace – more thoughts

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.

The only difference (in the block map) between logged in and not logged in users, would be the fact that logged in users would have a link out to their ‘real’ presence map. This does seem to be quite restrictive for logged in users (as we do actually have the other data that’s displayed on the actual presence map) but I’m wary about making the LabSpace page too JavaScript heavy – which would be required to make the map embedded in the block monitor all the users/presence changes.

Any other suggestions/possibilities welcome as to how the embedded maps should function for logged in vs logged out users 😉