The MSG Map Widget allows you to display an MSG presence map on your own webpage, as demonstrated below:
All you need to embed this on your own page is to paste the following code in where you’d like the map to appear:
By changing the parameters passed you can change:
- MSG server to connect to
- height and width of the map
- initial zoom level and map centre coordinates
- filter – and whether or not the map should be filtered at all
- show either all users, or just online users
- how often the data should be refreshed (if at all)
- visibility of the filter control box
Here is on overview of the parameters and their defaults:
- host: the MSG server to connect to, valid values are: ‘msg.open.ac.uk’ or ‘msg-openlearn.open.ac.uk’, default: ‘msg.open.ac.uk’.
- height: height of the window to be displayed (in pixels), default: 100.
- width: width of the window to be displayed (in pixels), default: 100.
- zoom: initial zoom level, default: 0.
- lat: initial latitude coordinate, default: 0.
- lng: initial longitude coordinate, default: 0.
- filter: initial filter text, default: null. If no filter is specified, only online users will be shown. This filters based on the group name and description (for the OpenLearn site – this is equivalent to the course code and title).
- refresh: refresh rate (in seconds) of the map markers, default: 0. The minimum refresh rate is 60 seconds, if you specify less, it will be set to 60. If the refresh rate is set to 0, then the markers are not refreshed.
- view: whether to view all or just online users, valid values are ‘online’ or ‘all’, default: ‘online’.
- filterControl: whether to display the filter control in the top right of the map, valid values are ‘true’ or ‘false’, default: ‘false’.
Finally, here are a few notes & FAQs about the widget:
- You canâ€™t select to highlight the text in the filter box, you need to delete each character – which we know is a right pain. Weâ€™ve not figured out why this is – 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.
- Similary, the tab to â€˜goâ€™ button on the filter 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.
2 replies on “MSG Map Widget”
[…] I’ve created a page on the MSG website to explain the various options/parameters available. All feedback welcome […]
[…] We’ve just launched the MSG Map Widget, so you can embed a Google mapp displaying who is on or offline on MSG. Options to filter on the group name/description (course code/title for OpenLearn) are also available. Full details plus demo. […]