Wiki

Clone wiki

ucsb-geog-icm / Home

Introduction to the UCSB Interactive Campus Map

This repository (ucsb-geog-icm) serves as a master repository and contains everything related to the UCSB Interactive Campus Map Project (http://map.geog.ucsb.edu) including the source code to the web application itself.

The UCSB Interactive Campus Map (a.k.a. UCSB ICM or ICM for short) has been an ongoing project supported by the UCSB Geography Department aimed at developing a beneficial map resource for the University of California, Santa Barbara. The UCSB ICM has been entirely developed by students at UCSB and gone through many improvements since it's initial release in 2010. We are continually developing the map, adding features and making it a better resource for UCSB. We welcome all who are interested in contributing and would love to see you at the next meeting!


Products & Services

Web Application (ucsb-geog-icm-www)

The web application is composed of multiple components and services that work together to provide and help maintain the UCSB ICM Web Map (http://map.geog.ucsb.edu). Some of the modules and components have been developed specifically for UCSB and may not work for other deployments.

Public Web Map

Currently running at: http://map.geog.ucsb.edu/

The web map can be accessed from any modern web browser on smartphone devices, laptops, and desktops. It can be used to search for classes, professors, buildings, rooms, and more as well as provide lots of information about resources and points of interest around campus via the numerous layers available.

Admin Control Panel

The Admin Control Panel allows management of the layers, searchable feature, uploaded images (for layers and building photos), and short-links that have been generated. It is accessible using any modern web browser and requires a username and password to gain entry.

Source: /admin.php This module is a part of the UCSB ICM Web Application component (ucsb-geog-icm-www)

Public API

Public API URL: http://map.geog.ucsb.edu/api

This API is used directly by the ICM and powers the Energy Data and Search Map modules.
Those who are interested are encouraged to use the data that we provide for nonprofit or educational purposes. All requests are made by settings parameters in the url and results are returned in JSON format.

All parameters and settings are CASE SENSITIVE.. This means searchmap is not the same as searchMap or SEARCHMAP. If you are getting no results, make sure your parameters and settings are correct.

FULL DOCUMENTATION AVAILABLE VIA THE API ITSELF http://map.geog.ucsb.edu/api

Share Map Module

This module allows users to generate a URL that can be shared and used to load the same exact map view. This is excellent for linking students to a professors office, or showing visitors where the parking and event are being held. The share link module also uses YOURLS to create a shorter, more distribution friendly version of the URL in the form of http://link.map.geog.ucsb.edu/<whatever>.

Source: /js/shareLink.js

This module is a part of the UCSB ICM Web Application component (ucsb-geog-icm-www)

Example Share Link:

http://map.geog.ucsb.edu/?activelayer=foodEstablishments&xmin=-13341481&ymin=4084126&xmax=-13341305&ymax=4084264

Example Link (Shortened): http://link.map.geog.ucsb.edu/cm

Layer & Usage Analytics

*-- TODO --*

UCSB Specific Modules

Search Module

The module also generates a link that can be shared with other people so that when another person visits the URL, the map will zoom to the building automatically onLoad.

Source: /js/room_building_Finder.js

This module is a part of the UCSB ICM Web Application component (ucsb-geog-icm-www)

Energy Data Module

*-- TODO --*

Building Info Module

*-- TODO --*

Parking Info Module

*-- TODO --*

ArcGIS Online (Published Layers & Data)

*-- TODO --*

Versioned Multi-User Geodatabase

*-- TODO --*

Frequently Asked Questions

What is included in this repository?

This repository (ucsb-geog-icm) serves as a master repository and contains everything that is needed to setup the UCSB ICM from scratch. This include documentation (usually in the wiki or README.md), source code, service configurations for various components that work together to run the UCSB ICM.

Each component is added as a git submodules (www/<=>ucsb-geog-icm-www.git, tools/<=>ucsb-geog-icm-tool.git, etc..) and can be downloaded, updated, and synced very easily using git's submodule functions. This also allows us to control which components are public and which require permission to keep the more sensitive components secure. If you do a git submodule update and need access to one of the components that aren't publicly available by default, you can contact icm@geog.ucsb.edu to request access.

  • /wiki/ - [THIS PAGE] General documentation for the UCSB ICM . Each individual component should have it's own documentation on it's git repository page but this is the location for the "big picture" docs and describes how all the components work together.

  • /www/ - Source code to the web application including the map, custom API, Admin dashboard, and all included submodules. The application is written in PHP, JS, CSS, HTML5 and used MySQL as a database for the layer and configuration settings.

  • /solr/ - Configuration files for the Solr search engine search which powers the search module and greatly improves the search result quality.

  • /tools/ - Tools used during the development of the UCSB ICM. Currently only includes a benchmarking tool (jmeter) and some custom configurations that were used to benchmark the ArcGIS Server's.

  • /vagrant_vm/ - Vagrant configuration to create a virtual machine that is pre-configured to be used to test changes in the /www/ locally. Requires the latest version of VirtualBox and Vagrant.

If I wanted to run my own instance of the Interactive Campus Map.. where should I begin?

Take a look at our Overview page on the Wiki which hopefully explains everything!

Where can I find more information about the UCSB ICM?

Thanks for your interest in our project! All of our documentation is available through the wiki and various submodule wiki's. One ongoing goal of the project is to maintain the self-sustainability of the project. By keeping our documentation online and publicly available through a wiki, we are more easily able to make that a reality. If you have any other questions, comments, or requests feel free to e-mail the ICM Project Lead @ icm@geog.ucsb.edu

How do I download the latest version of the master repo and all components?

The easiest way to download everything and get started is to use git clone.

$ git clone git@bitbucket.org:bryankaraffa/ucsb-geog-icm.git

This will download the git repo locally to /ucsb-geog-icm/ and allow you to use git submodule to download the components.

$ cd ucsb-geog-icm/
$ git submodule update --init --recursive

By default, you will only have access to some of the components. If you require access to one of the private components you can e-mail icm@geog.ucsb.edu to request access.

Once you have an up-to-date directory with the submodules downloaded you can cd into the directories and git will automatically detect the git submodule's original repo and you can use standard git commands like git checkout, git branch, git commit, and git push to make changes. To make changes to a different submodule, simply cd into that submodule's directory and use git as you normally would. For example:

cd www/
git pull
git checkout -b my-new-feature

[Make some changes]

git commit -a -m "Branch for my new feature"
git push

There is lots of documentation available for git submodules including best practices and suggested workflows. I strongly suggest reading up if you are not comfortable with git or git submodules before pushing commits to any of the repos.

I've never used git before, why is it used?

We made the decision in 2013 to put everything in a version control system (first SVN, now a git repository on BitBucket) because they are great tools for versioning everything with native functions in place for remote collaboration. It has proven to be very useful and we do plan on continuing to use and provide updates via our git repositories.


Requirements

Required Components & Services

  • ucsb-geog-icm-www Source Code
  • Solr - Search Engine that powers the Search Module
  • Apache (HTTPD) - HTTP Server that the UCSB ICM uses.
  • PHP - An easy to use server-side programming language that is very well supported
  • ArcGIS JavaScript API - Web Mapping Library developed by Esri
  • ArcGIS Server (and ArcGIS Web Adaptor if using multiple ArcGIS Server instances)- Hosts the GIS resources on the web so they can be used by various services including the ICM. The Web Adaptor serves as a proxy and balances the load between the GIS servers.
  • MySQL - Relational Database that stores the settings, analytics, and various data that the ICM uses
  • Tomcat - Java servlet ocntainer that the ArcGIS Web Adaptor runs on.

Optional Components & Services

  • Network Attached Storage - Required to run ArcGIS Server on more than 1 server (GIS Tier)
  • PostgreSQL - Open-source relationship database that we use to host our Esri Enterprise Versioned Geodatabase. Contains a majority of UCSB ICM gis data.

Scheduled Tasks

  • Monthly Energy Data Exports
  • Updating Searchable Features (Classes) quarterly via ICM Admin Dashboard

Automatic Build & Deployment Status

We use Codeship and BitBucket to automatically build and deploy the web application source code to our web server(s). This allows for better collaboration, better quality control through pull requests, and easier deployments once changes are tested and approved. The current status of the latest deployment to http://map.geog.ucsb.edu/ is below. Green is good (stable) -- anything else and there most likely is an issue

Codeship Status for ucsb-geog-icm-www: Codeship Status for bryankaraffa/ucsb-geog-icm-www

Updated