Content uploaded by Thomas E. Portegys
Author content
All content in this area was uploaded by Thomas E. Portegys on Apr 16, 2014
Content may be subject to copyright.
A Location-based Cooperative Web Service Using Google Maps
Thomas E. Portegys
Illinois State University, USA
portegys@ilstu.edu
Abstract
LoCo (Location-based Cooperative) is a web service that allows people to cooperate on
activities that are organized around locales. It allows users to add content-associated
markers to a map and to view and search for markers based on selected criteria, such as
content, dates, and user names and addresses. This service has many applications, for
example, individuals might use it to locate others who are willing to buy or sell items and
services that are only feasible to transport and/or utilize within a specific locale, such as
piano lessons or leasing farm machinery.
Keywords: location-based web service, cooperative, Google Maps
Introduction
Within the last few months, Google has released a free service and programming
interface (maps.google.com/apis/) that allows location-based web services to be easily
implemented by referencing map locations. Here are some examples: avian flu outbreaks,
cheap gas prices, crime incidents, cell-phone towers, free Wi-Fi hotspots, weather
conditions, real estate listings, etc. See googlemapsmania.blogspot.com for many more.
According to CNN Money.com’s Erick Schonfeld, “What's fascinating about these maps
is that they have the potential to link all Internet data to the physical world. Any data feed
that includes a street address can be mapped.”
Yahoo! (developer.yahoo.net/maps/) and Microsoft (local.live.com/) have also release
mapping products recently in response to Google. According to Yahoo!, "Yahoo! Maps
API gives developers of all levels free public access to Yahoo!'s SmartView Technology
- enabling them to see their own geographical data on Yahoo! Maps. Developers can now
create customized maps by overlaying a variety of content onto an existing Yahoo! Map
including weather reports, school district boundaries, open houses, garage sales, vacation
photos, and more."
In the process of coming up with a paper topic related to mapping, I wanted something
that might be of practical use for small-scale localized activities. I chose to design an
easily deployable web service using Google Maps that will allow users to cooperate and
collaborate on general-purpose location-based applications. Google Maps was chosen as
the most developed of the mapping products.
LoCo (Location-based Cooperative) is a web service that allows people to cooperate on
activities that are organized around locales. It allows users to add content-associated
markers to a map and to view and search for markers based on selected criteria, such as
content, dates, and user names and addresses. This service has many applications, for
example, individuals might use it to locate others who are willing to buy or sell items and
services that are only feasible to transport and/or utilize within a specific locale, such as
piano lessons or leasing farm machinery.
Although there are other map-creation services on the Web, such as MapBuilder
www.mapbuilder.net/, and Frappr www.frappr.com/, what distinguishes LoCo is the
following combination of features:
• Interactivity – users can input annotated information themselves.
• Map content ownership – data and software hosted on web server of choice.
• Open source – completely customizable software.
• Search/filtering – selectively view content based on user-provided criteria.
Location-based service is a term that encompasses a number of categories of service
(Kupper, 2005). One type of service, often involving GPS (Global Positioning System)
technology, allows mobile wireless users to view and interact with entities within their
vicinity, which may include other mobile users (Blyer, 2003; Hightower and Borriello,
2001). A related system is the Onstar service that provides GPS/wireless-based vehicle
assistance (Allan, 2003). Another type of service involves localized web searching based
on schemes that associate IP (internet protocol) addresses with geographic locales
(Papapetrou and Samaras, 2004; Padmanabhan and Subramanian, 2001). So for example,
a search of apartment listings could be constrained to produce listings within the user’s
geographical area. Map-based services are so recent that there is a dearth of research
literature on them. For map-based services such as LoCo, a map is the starting point of a
query. Maps make use of the power of the human visual system to understand and
organize spatial information. Starting with a map, sources of desired content can then be
located that are within a desired geographical locale, and transportation issues more
easily evaluated.
Description
A view of the web service prototype can be seen in Figure 1. It also can be seen and used
at itklinux.itk.ilstu.edu/LoCo/loco.php The current software package is available at
www.itk.ilstu.edu/faculty/portegys/programs/loco.zip The view is after a user registers
and logs in. The panel on the left side of the page shows a Google map of the Illinois
State University/downtown Normal, Illinois (USA) vicinity. A marker has been added to
the map near the location of my office in Old Union. Google maps allow a user to zoom
in and out and smoothly pan in any direction using the mouse.
Figure 1 – LoCo Web Page
The right panel contains various controls and information fields, including:
• A user name.
• Address of interest. A geocoding service also allows a user to move and center the
map at a given address.
• Marker content – this is information that is associated with a marker, and is
displayed over the marker when it is clicked. The marker content can contain an
extensive variety of HTML formats, including image links.
• Start and end dates – these would be of use to know when a service or item is
available.
• Operational modes:
o View all – show all the markers on the map.
o View filtered – show only markers that match user-supplied criteria, such
as user name, address, marker content, and dates. These have been
selected by the filter command button (see below).
o Add – in this mode, new markers can be added to the map by clicking on
it. Such a marker will have any supplied information, such as content or
dates, associated with it for later retrieval. In addition, these markers will
be “owned” by the creating user.
o Remove – remove markers that are owned by the current user by clicking
on them.
Below the mode buttons is a notice text box for instructional and error messages. Below
that is a set of command buttons that perform the following actions:
• Reset – clear the controls
• Filter – works with view filtered mode; markers are selected based on matching
values of controls, such as user, address, etc. Content matching is currently a
simple line-by-line string match; in future this will be a Google search function.
• Refresh – request the server to update the map from the server with marker
changes made by other users.
• Save – save marker changes to server.
• Help – help page.
• Logout.
The system is written in PHP, HTML, and JavaScript and will run on any server that
supports PHP and any browser that supports JavaScript. In the future, the marker content
may be stored in a database such as MySQL.
System requirements:
1. A PHP-enabled web server.
2. A Google Maps key, available at maps.google.com/apis/
3. An initial latitude and longitude to center the map, available at geocoder.us/
Installation:
1. Unzip the package in the web root directory. Make the files
readable by the web server user id. Make the data files, users.txt
and markers.txt, writable.
2. Edit the main.htp file:
Put the Google Maps key in the maps.google.com script line.
3. Edit the loco.js file:
Put the latitude and longitude in the home_* variables, e.g.,
var home_longitude = -88.986189;
var home_latitude = 40.509543;
To invoke:
www.your.host/LoCo/loco.php
Data files:
1. users.txt - user login/encrypted passwords.
2. markers.txt - markers file.
Conclusion
A general, easily-deployed location-based web service has been presented with the goal
of facilitating new applications. The software is open source and can be customized to
suit (available at www.itk.ilstu.edu/faculty/portegys/programs/loco.zip). A test
application is planned in the upcoming months during the garage-sale season in the USA.
As mapping services such as Google expand, the availability and quality of applications
built on them will grow. Currently, commercial applications cannot freely use the Google
mapping service, but it is to be expected that the influx of new commercial applications
will inspire leasing arrangements.
References
Allan R (2003) Onstar System Puts Telematics on the Map, Electronics Design, 31
March 2003, pp. 49-56.
Blyer J (2003) Location-Based Services Are Positioned for Growth, Wireless Systems
Design, September 2003, pp. 16-20.
Hightower J & Borriello G (2001) Location Systems for Ubiquitous Computing, IEEE
Computer Magazine, August 2001, pp. 57-66.
Kupper, A. (2005) Location Based Services: Fundamentals and Applications,
ISBN/SKU0470092319, Wiley and Sons, September 2005.
Padmanabhan V & Subramanian L (2001) An Investigation of Geographic Mapping
Techniques for Internet Hosts, Proceedings of SIGCOMM'2001.
Papapetrou O, & Samaras G (2004) Ipmicra: Toward a Distributed and Adaptable
Location Aware Web Crawler, Advances in Databases and Information Systems.
Schonfeld, Erick (2005) Where Google's maps will take us, CNN Money.com
money.cnn.com/2005/08/04/technology/techinvestor/tech_biz/