Posts tagged ‘api’

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.

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?

Social:Learn, SocialLearn and SociaLearn

The OU SocialLearn project has been running a little ‘behind the scenes’ for the last few months and I’ve kept broadly up to date with what’s going on, but I’ve not been deeply involved (and OK, I’m still not sure what variation of the words ‘social’ and ‘learn’ make up the proper project title). Rather than me explaining it all here, Martin has posted an overview.

The SocialLearn API is now available (though I don’t think it’s public yet), so I had a catch up with my colleagues Liam and Nick, who have each been building applications using the API. Liam’s work has been on ‘Microlearner’ which links up Twitter to the SocialLearn API, so you can post learning goals to Twitter and they’ll magically be available in your SocialLearn profile. 2Learner is Nicks application, which allows you to search for resources.

From chatting to Liam and Nick it seems there’s still a way to go with the API (unsurprising as it’s a work in progress), for example, there’s currently no way to relate a resource to a learning goals, but I think this may change in the future.

The API has much in common with the Facebook API, in that there is a core set of functions and associated data on the SocialLearn server, then any applications can build upon these, but these applications are siloed, (i.e. applications can’t share any other data than that available through the API). While this might be fine for Facebook, and is entirely appropriate for that (especially with all the privacy issues involved), I’m not sure if this approach may restrict the range of applications that may be developed with the API – I’m assuming throwing buns and being bitten by vampires are not top priorities for SocialLearn.

We had a think about how we can get Cohere talking to the SocialLearn API, and what makes sense as a demonstration using the 2 existing applications. What we came up with was the ability to import your learning goals into Cohere, and then be able to organise then in a more structured way, but additionally to allow you to push out any ideas you enter into Cohere as goals in SocialLearn. Each of these will be fairly trivial to do, albeit in a not very clever way… so best get on with it ready to demo next week.

Google Earth in the browser

Google have just launched a browser plugin which allows you to embed Google Earth into your web browser:

Currently looks like it’ll only work on Windows. The video above seems to make it easy to switch from a Google Maps API mashup to a Google Earth API – here’s a example and the plugin download is only triggered if someone selects the ‘Earth’ view.

Not sure if this would really give any great benefit to the MSG Presence Map, but if anyone can give me case when it may be useful then I’ll get it added!

More MSG widgets & applications

Have just started to have a look at developing an MSG widget/application for Facebook and am getting myself familiarised with the Facebook developers API. Appears to be fairly straightforward so far – well, I guess it can’t be too hard judging by the number of applications already out there and the API has only been available since around June (I think!).

One thing I do need to get sorted is exactly how the application should work and how it should interact with your facebook friends. My thinking at the moment is that it should look to see which of your friends have both a facebook & MSG account on the server you’ve specified and display their MSG presence – but I need to think a little more about how this would work in practice, or maybe it should just display all your MSG contacts? But then there could be less linkage between your Facebook contacts identities & MSG contacts identities. hmmm.. any ideas/thoughts?

Publishing presence status

I’ve finally finished writing another little widget that I started a while ago, this one allows you to display live presence status embedded on any webpage, without the end user being logged in to MSG (or even needing an MSG account) – you can see it in action at the top of this page. Clicking on the status icon will launch the MSG client.

In order to prevent anyone monitoring (or just displaying) anyone elses presence status, for each username and url (domain and directory) you’d like to display the icon on, we need to assign you a unique ‘key’ – in a similar way to how the Google maps API keys work. At the moment we don’t have an automatic form for generating these keys, so for now you’ll just need to email us with the username, and the url of site you’d like to display the icon on.

Here’s that code that you’ll need to paste onto your page to display the presence icon:

<script src="http://msg.open.ac.uk/msg/widget/msgstatuswidget.jsp
?host=msg.open.ac.uk
&user=a.little%25open.ac.uk
&refresh=10
&showText=true
&key=mykey
&showIcon=true">
</script>

Here’s a brief description of each of the parameters:
host: MSG host server where the user account resides
user: username of the presence icon to display
Refresh: how often (in seconds) the widget should check for presence changes. Minimum is 10 seconds and specifying 0 will mean the presence status is only loaded when the page first loads
showText: true/false of whether to show the textual description of the status (default false)
showIcon: true/flase of whether to show the icon (default true)
key: key for the url and username combination

Any comments/feedback welcome 🙂

UK geocoding

Google have just announced that their geocoding API will now geocode UK addresses – so should make things much easier for maps developers. Will need to think now as to whether to move to this service for MSG, rather than using the Geonames service – a (possible) reason for moving to the Google API is that it’ll geocode full UK postcodes, whereas Geonames is only accurate to the first half of the postcode.

MSG Netvibes widget

Just looking a creating a Netvibes widget so users could embed a slimmed down MSG client into their Netvibes page, and looking around all the info to do with Universal Widget API (UWA) – seems to be straightforward enough so far – good that the widget will also be able to work with Google & Apple dashboard.

Main issue is going to be deciding exactly what the functionality of the widget should be – my thought at the moment is that it should just show your status, plus your currently online contacts (not in groups??), then if you want to get more info etc (or chat) you’ll need to launch the actual MSG application.

Any suggestions as to whether this is enough/too much etc etc welcome (especially with not displaying the users in groups, and not showing offlien users).

Embedding MSG maps in LabSpace Moodle

Fixed quite a few little bugs and other things we needed to get sorted out this week, for example transferring the Moodle MSG block so that it uses the MSG API that we’ve developed. That required a few changes to be made to how the API worked – though only additions rather than changing how it worked originally.

We also released the latest version of the MSGAlert tool (v2.1 – more info) which now includes a link to the MSG presence map. Currently this is only available for the msg.open.ac.uk server (and not msg-openlearn.open.ac.uk, but that’s coming soon). Marc has been demonstrating (amongst other things!) our MSG maps implementation as the EleGI project review meeting this week. This gives a good cohort of users from across Europe to test out the maps and find if there are other remaining bugs or things we could improve.

This morning I also started to look at embedding the maps within the Moodle MSG block, my thinking at the moment is to put a very small Goolge map with in the block (if you are logged in) and the map would centre on your location and put a marker there of you online, but then to view all the other users you would need to click on a link (or on the map) to launch the full MSG presence map. So somthing like…

In fact this is already up and working on my development server. Just not sure that the map isn’t a little too big? Another quesion I’ve got is what to do when users aren’t logged in? I want to show somthing of the map – to try and “entice” people to sign in, rather than just a text link or nothing at all. Maybe it should show a short demo video of how to use the maps – something which I ought to produce anyway? Any other suggestions gratefully received 😉

In case you are wondering, I’m not planning on having all the users contacts displayed on the embedded block map, users will have to go to the actual MSG Presence Map page for this. The reason being that it’s potentially to heavy to have all this javascript going on in the background all the time, especially when there may be other block and content doing JavaScript ‘stuff’ too.

MSG, widgets & OpenID

Been thinking about creating a netvibes widget for MSG, once the Netvibes widget API is released (announcement), might be good thing to do, especially since we’ve already got a an API for MSG – so ought to be straightforward enough to fix up. Then we can automatically have a widget for a plethora of platforms/applications with very little effort! Would be especially good when Netvibes supports OpenID and if we can allow people to log in to MSG using their OpenID account. Would be very nice if the OU became an OpenID identity provider …