Posts tagged ‘google map’

Filtering with MSG Map Widget

I’ve just finished updating the MSG Map Widget so that you can allow filtering. The filter can either be specified in the javascript command and/or an optional filtering control can be added to the map. You can also select whether you would like to display just the online users or both on and offline users. Another new option is the ability to have the map refresh every x seconds (the previous version showed the users at the point the page first loaded). See the map below for an example – this one shows all OpenLearn users who have enrolled on courses with ‘german’ in the title. Feel free to have a ‘play’ with the filter:

Few points to note…

  • You can’t select to highlight the text in the filter box, you need to delete each character – which I know is a right pain. I’ve not figured out why this is – I’ve a feeling it’s something to do with the fact that text box is within a Google map, so ‘selection’ doesn’t work in the same way – since holding the mouse button down whilst dragging means something different in the map context. But I could be wrong about this!
  • Similary the tab to ‘go’ button on the form doesn’t work – you need to use the mouse :-(
  • When the maps says it’s showing ‘all’ users this isn’t quite true! It actually shows all the online users, plus up to a maximum of 100 offline users. This is help prevent potential performance problems when displaying 100′s or 1000′s of markers.

I’ve created a page on the MSG website to explain the various options/parameters available.
All feedback welcome :-)

MSG Map Widget

Spent couple of hours putting together a little MSG map “widget” – so you can embed a Google map with markers for where users are online on your own webpage as the examples below show….

For the msg.open.ac.uk server

For the msg-openlearn.open.ac.uk server

This is the code that you need to use to embed this on your own page:

<script src="http://msg.open.ac.uk/msg/widget/msgmapwidget.jsp?host=msg.open.ac.uk
&height=300&width=450&zoom=2&lat=50&lng=0"></script>

Just change the parameters for fit what you’d like to show and how:
host: the MSG server to get the info from – valid entries currently are: msg.open.ac.uk or msg-openlearn.open.ac.uk
height: height of the map to display
width: width of the map to display
zoom: starting zoom level of the map
lat: starting latitude coordinate for map centre
lng: starting longitude coordinate for map centre

At the moment it’s just something I’ve been playing with, but would be good to be able to extend so that it can show the presences of your own contacts and give live presence info and provide the click to chat links etc.