UNE Map Interface
Maps
The UNE Maps are designed to help people find locations and people.
The maps can be used in several ways:
A visitor can simply browse the map finding buildings and their contents.
A web page can link directly to a particular location on a particular map.
A visitor can search for a code or building or organisation and find it on the map (not done yet)
Linking to a location
Linking to a location from another web page is easy.
- Simply browse one of the maps
- Click on the location you wish to link to
- Copy the URL including the #hash part into your link
URL Structure
While you can easily browse the map and save the url you may want to programatically create the url.
The map url's are simple to construct are flexible allowing you to link to a map, a building on a map, a room in a building on a map and eventually more detailed location information. The current map is quite simple using an image map and javascript but when it gets replaced with a more sophisticated solution the map url's will not change.
Linking to a map:
At present the available map names are 'une' and 'colleges'.
Linking to a building:
If a code doesn't exist on a map it will just show the map.
Linking to a building with a custom label
The title and body url parameters can contain html markup as long as it is valid and properly url escaped. The form below can be used to help create properly escaped links.
These url's form a simple API for linking to the map. There are plans to add to this API to allow:
- linking to rooms within buildings
- link to ad hoc locations using lat/long
- linking to a 'chooser' where the user can choose a building
The current map is implemented using an image map, and a simple table but future implementations could use a dynamic image or use a third party map such as google maps.
Custom label form
The building picker
The map can be used as a location picker on other online forms. Simply open the maps using javascript in a new window and provide a get parameter with the name of a javascript callback function. Once the user has selected a location the map will close, call the function with the details of the location.
Eg:
/maps/une/?callback=map_callback
The call back function will be called with three arguments, the map name, building code and building title. It is up to the callback function to do what is needed such as populate a form field with this data.
In the example below the call back function 'alerts' the three values and then populates the form input with the chosen building code.
View the source of this page to see the javascript source.
