How to use maps and calendar data on your site.

by aoliveira on April 10th, 2012

Maps:

 

The FIU Campus maps was written on a JSON/AJAX platform. JSON is standard method of retrieving information for JavaScript and is supported by many programming languages, PHP included.

 

There are two ways of fetching information from the campus maps. Search buildings by leveraging a keyword or by querying a building by its id.

 

To search, you must leverage the url http://campusmaps.fiu.edu/search.php with a GET request.

 

The following are the parameters the url will accept:

q – to query all locations with a specific keyword

a – to retrieve a list of all locations that begin with a certain character

callback – the reserved parameter required for a JSONP format

 

So, if for example, you wish to retrieve all locations that have the keyword “panther” in a JSONP format, the full url would be:

 

http://campusmaps.fiu.edu/search.php?callback=yourCallBackHere&q=panther

 

To see what this would bring back, go ahead and click on the link.

 

To retrieve the information of a location by its id is similar. The url you need to access is http://campusmaps.fiu.edu/content.php

 

The following are the parameters the url will accept:

i – The id of the building

callback – the reserved parameter required for a JSONP format

 

So, if for example, you wish to retrieve the information of the Panther Parking Garage, id pgp, in a JSONP format, the full url would be:

 

http://campusmaps.fiu.edu/content.php?callback=yourCallBackHere&i=pgp

 

To see what this would bring back, go ahead and click on the link.

 

It should be a simple task now that you have acquired the information to display it in a format to your liking.

 

Calendar

 

The FIU calendar support multiple ways to pull information.

 

The most direct way is to simply link to the urls that the calendar provides. They can be found on the right hand side of the site, beneath the search bar.

 

There, you should see icons that represent the different ways that a feed can be pulled. PDF, RSS, iCAL, and CSV (a spreadsheet format) respectively.

 

The PDF and CSV feeds update with the date ranges and categories as you interact with the page while the RSS and iCAL feeds display only the upcoming events by default.

 

All feeds are attached to a particular calendar. If you click on the url while viewing the Academic calendar for example, all the feeds will relate to the Academic calendar.

 

However, all feeds can be modified manually by changing the following parameters.

 

The parameters that all feeds accept are the following:

cat – filter all events by a category

  1. academics
  2. alumni_and_community
  3. arts_and_entertainment
  4. athletics_events
  5. lectures_and_conferences
  6. student_life
  7. faculty_and_staff_life

id – fetch only the specified event by its id

start/end – fetch only the events that fall in between the dates specified (format: yyyy-mm-dd)

search – fetch only events whose title contains the keyword

tag – fetch only the events tagged with the following keywords

 

So, if for example, you wish to retrieve the events tagged with the keyword “sports” in the main calendar in a csv file, for the month of April 2012 you would visit the following site:

 

http://calendar.fiu.edu/events/spreadsheet/calendar:main?start=2012-04-01&end=2012-05-01&tag=sports

FIU Web Communications is a full service web team that provides support and consulting for departments at FIU. If you need help in implementing any of your web needs, please contact us.

If you enjoyed this post, please consider leaving a comment or subscribing via rss feed or email to have future articles delivered to you.

From general

Comments are closed for this entry.

Work with us