Вы находитесь на странице: 1из 6

An Expert System for Tourists Using Google

Maps API
Aleksandar, Pejiü; Szilveszter, Pletl; Bojan, Pejiü
Subotica Tech, Department of Informatics, Subotica, Serbia; www.vts.su.ac.rs
e-mail: alex@vts.su.ac.rs, pszilvi@vts.su.ac.rs, bpejic@vts.su.ac.rs

Abstract— In the field of eTourism, it is important to integration of readily available open source and free to
present prominent objects of tourists destinations. use software, frameworks, APIs, libraries, data sources,
Nowadays demand for eTourism applications is rising and external services and functionality to create a platform for
the customers need rapid software development. Google running our Web 2.0 service. This development model is
Maps API is a technology provided by Google based on known as “Mashup” - a web application hybrid [4].
AJAX, which powers many map-based services. This paper
presents an expert system for tourists. The realized software
uses free, public API service from Google Maps. The system
utilizes a knowledge base formed by tracking user actions.
The expert module suggests information of special interest
to the user.

Keywords: Rapid Web Prototyping, Google Maps API, AJAX,


eTourism, mashup, fuzzy logic.

I. INTRODUCTION
In recent years more and more information is available
for tourists on the Internet. However, it is known to many
that it is becoming increasingly difficult to obtain quality
information. Growing requirement for modern websites is
rapid web development along with customized data
services. Intelligent software agents have been used to
make recommendations of items in a wide variety of
domains, as e-Tourism. A fuzzy clustering method of
construction of ontology-based user profiles is proposed in
[5]. Similarity measures are usually used for determining
distance between the clusters [6].
Section II. presents the Rapid Web Development
technique. Some basic problems based on Google Maps
API are described in Section III. Structure of the
developed software is presented Section IV. Technical Figure 1. Illustration of mashup model
realization of the application is described in section V.
Testing and validation of proposed algorithm is presented Figure 1 illustrates a simple mashup model where web
in section VI. Finally, we conclude this paper in Section services and multiple external and internal data sources
VII. are combined.

II. RAPID WEB DEVELOPMENT III. GOOGLE MAPS API

Rapid Web Development means quick and efficient web Google Maps is a web-based mapping service provided
application building. It is part of the Rapid Software by Google which provides a slick, highly responsive
Development described in [1]. Beside the obvious visual interface built using AJAX technologies. This
objective of meeting customers’ deadline, another service has detailed street and aerial imagery data, and an
characteristic of Rapid Web Development is fast open API allowing customization of the map output
prototyping. Mockups and partial web application including the ability to add application specific data on
versions aid evaluation, usability testing and simulation the map (and also integration to third-party websites).
of planned features. Google was created the Google Maps API to allow
The Rapid Web Development process uses existing developers to integrate Google Maps into their websites
technologies and brings them together allowing us to with their own data points, and it is a free service.
focus on the real task of application building. It implies

978-1-4244-5349-8/09/$26.00 ©2009 IEEE 317


Authorized licensed use limited to: ULAKBIM UASL - Yeditepe Universitesi. Downloaded on March 15,2010 at 06:52:22 EDT from IEEE Xplore. Restrictions apply.
Google Maps API is based on a very simple suite of with the standard of most browsers, but also the
classes (components) within a JavaScript container reliable rendering of our web page.
directly within a XHTML page, and these classes were
• VML (Vector Markup Language) –on top of our
loaded from Google each time we opened a Google Maps
Google Maps application we used polylines as
web page. All of the functionality of Google Maps is
an overlay. For compatibility with Internet
based on this embedded JavaScript object built in a web
Explorer, we included the Microsoft VML
page, and this component was provided the interface to
namespace within our XHTML definition.
the Google Maps service and generated the map on users
Without this option, our polylines will not work.
screen by loading the necessary image components and
tiling them onto the display. The interface of the API was • Styles – we were completely free to develop and
hiding some powerful classes, objects, and interfaces that design our own styles, stylesheets, and layout
enabled us to manipulate the Google Map. With according to the needs of website. Google Maps
combining this interface with the data that we wanted to has no limitation or restriction on how we layout
display, it was possible to support interactive elements on or style our website when it includes a Google
the web page without reloading the page or redisplaying Map.
the portions of the map – the entire process was handled
• XML (Extensible Markup Language) –The
by JavaScript and Google Maps application. Valuable
XML standard is a way of representing data in a
tips on using these services can be found in [2].
structured format that is architecture neutral.
The Google Maps API is essentially a suite of JavaScript Although XML isn't a required element in
classes that we used to build applications within the Google Maps applications, it is common to
confines of the web page. API understanding was relied provide large volumes of data (map points,
on knowing the terminology used to define sections of the information windows, etc.) by specifying the
Google Maps API and interface. Detailed documentation information in XML, loading the XML through
on API can be found in [3]. Google Maps applications Google Maps API, and than displaying that
usually start with a simple map. To this map we added a information using the functionality of the API.
number of different elements designed to provide We have exploited this ability to present our
application functionality. In this work we used following data.
elements:
• JavaScript – the Google Maps API is based on
• Overlays – representing POI (point of interest) the JavaScript language. JavaScript was built
on map or lines denoting areas, routes, or other into most browsers and provided a rich suite of
information about the location being displayed. functionality for developing dynamic elements.
In this section was available some GLayers The majority of JavaScript programming was
which were providing various data type on the designed to interface directly into the Google
map as pictures, text or video (Panoramio, Maps API, which itself is based on an object-
Wikipedia, and YouTube layers); and markers oriented interface to a suite of Google Maps
and polylines. specific classes.
• Events – are triggered by some action, such as
the user click or mouse over on a POI or some IV. SOFTWARE STRUCTURE
other action associated with GEvent.
InfoWindows are commonly called with GEvent In this section the structure of the realized software is
and click action. described. The project is focused to provide information
• Controls – basic interface controls that enable on tourist and business objects in Paliü and around Paliü
user to zoom in and out the map, move the map Lake, a popular tourist destination in foremost north of
effectively, and ability to change between map Serbia. The result of project is a web site and can be
types. found at location http://palic.in.

• Services – extends Google Maps API with A. User interface


adding new functionalities and features that are User interface was designed that main focus to be on the
often available on maps.google.com first. In this map as shown in Figure 2. Layout scheme is very simple,
section are Geocoding, Directions, Google bar, a combination of header which contains a logo and
Ad-Sense for map and some others. widget buttons, and the content area which is held by the
We took advantage of Google Maps support for standard map. Right side of map is reserved for widgets, which are
WEB technologies. We used following technologies: giving a really nice interactivity to user interface, because
they are movable, collapsible, extensible and closable.
• XHTML – Google Maps will work embedded in
Content of these widgets is adjusted by expert agent. By
any standard HTML page, but Google
the buttons in header these widgets also could be hidden
recommends that we create pages that are
or shown. These widgets are containing options and
compliant with the XHTML standard, which
actions which gives user the interaction with the map,
will ensure not only that the code is compatible
selecting category by interest and listing markers,

318
Authorized licensed use limited to: ULAKBIM UASL - Yeditepe Universitesi. Downloaded on March 15,2010 at 06:52:22 EDT from IEEE Xplore. Restrictions apply.
directions or maybe displaying a third-party weather All objects are classified based on their individual
information by parsing an XML. On the left side map attributes value. The algorithm of classification of objects
there are controlls for map interaction like pan, zoom in is based on fuzzy logic. In this work we assume that the
and out. Tourist and business objects are presented with number of objects and classes is N and M respectively.
icons on the map. The fuzzy logic system to determine which class object
falls under has 3 inputs. Universe of discourse for each
input is covered by 3 triangular membership functions:
small, medium and large linguistic values. The three
inputs are: level of comfort, distance from the object of
interest (Paliü lake) and the price of the service. Figure 3.
illustrates an input space coverage.

Figure 2. Screenshot of palic.in user interface.


Figure 3. Membership functions of comfort input.

Technical background of construction like this contains: Classification of the every object is done during the
XHTML page with CSS, JavaScript, and PHP. A process of adding it to the database. After the
JavaScript library called jQuery is used mostly in creation fuzzification of each input we evaluate each rule in the
of user interface effects, jQuery and some extensions in rule base. A typical rule is as follows:
plugins form are helping to get the widgets and their
interactivity, and also some other functions like buttons R1: if (comfort is small) and
hover effect etc. A function of Google Maps API was (distance is small) and
used for implementing controls of the map. (price is small)
then (cluster is c1)
B. Services
There are many services provided by Google Maps API As a result of output from the rule base, one object may
like: Geocoding which from given address returns a belong to more than one cluster for some degree. The
geolocation (point on the map), Directions which takes us next step is to find maximum membership function value
from one point to another with detailed route instructions and assign the class to object which membership value is
(time and distance calculations), Streetview which gives the maximum.
us a virtual picture of location just like we are there, During the exploitation the system creates a log entry for
GoogleBar for local search of the map, KML/GeoRSS every visit and visitor. Returning visitors are identified on
overlays, and these are just some of the most interesting the basis of a web browser cookie. The cookie contains a
ones. randomly generated unique string value to identify each
visitor. During the visits, the system collects more and
On palic.in website integration, because the limits of
more information from user, this fact helps to correct
Google Maps API for Serbia (abilities with map
class assignment. If we once assign a class value to
interaction are not developed on the same level as for
visitor he becomes our user. It is not a unique class for
U.S., England) there were used only some of the services.
one user. The user may belong to more than one class for
These services are Directions used how to reach Palic in
some degree. The user interface of the application is
Serbia from given location, KML/GeoRSS overlays, and
divided in two parts, one is class dependent and the other
custom icons for marking different point (location) types
is class independent. Class dependent part of the user
on the map picked by category.
interface contains information about objects that belong
For some abilities which are not supported for Serbia yet, to the same class as user. In case of classification of user's
we developed our own solution, like street mapping and behavior in more than one fuzzy set, we consider the
naming. membership function value and find a proportion of
objects to be presented.
C. Expert system

The main task of expert system is to provide customized


information to users. The task entrusted to system was
realized as follows.

319
Authorized licensed use limited to: ULAKBIM UASL - Yeditepe Universitesi. Downloaded on March 15,2010 at 06:52:22 EDT from IEEE Xplore. Restrictions apply.
D. Database geolocation information, can have one or more pictures
grouped within galleries. Custom object grouping,
Database was designed using the relational model with multilingual content and inline linking (hotlinking) for
special focus on normalization. After determining the partner web sites are also stored. Database contains tables
information to be stored, basic objects, information for logging visitors’ actions on the website. Information
grouping and relationships between them were created. for profiling visitors and objects into clusters is also
The database holds information on tourist and business stored. Structure of the database is shown in Figure 4.
objects in Paliü and around Paliü Lake. Each object has a
set of basic information, such as name and contact
information, has some attributes like comfort level,
belongs to one or more categories, has address and

Figure 4. Database Enhanced-Entity Relationship Diagram

320
Authorized licensed use limited to: ULAKBIM UASL - Yeditepe Universitesi. Downloaded on March 15,2010 at 06:52:22 EDT from IEEE Xplore. Restrictions apply.
• PHP PDO library; Is a robust, lightweight and
V. TECHNICAL REALIZATION consistent interface for accessing databases in
The project is based on client-server technology, and PHP.
consists of server side and client side parts. During the • PHP Classes and Objects; Whole application is
development process we considered limitations of both developed using the OOP paradigm.
parts. The palic.in project was realized using mostly open • Database Abstraction Layer; We developed an
source software and some proprietary but free-to-use PHP class to unify the communication with
software and services. The underlying development different database types.
platform for our application is WAMP (Windows- • SQL Views; We stored logical tables as SQL
Apache-MySQL-PHP), while the actual web application query.
hosting platform is LAMP (Linux-Apache-MySQL- • SQL Stored Procedures and Functions; We
PHP). Figure 5 shows a typical server and client software achieved improved security and speed increase
stack needed for web application deployment. with them.
• SQL Triggers; We used them to improve
Server side database integrity.
Application • Geotagging. We used it to add geographical
identification to various media.
PHP
The following data services are used:

Apache MySQL • Google Maps API (proprietary but free to use);


• Weather.com weather forecast (proprietary but
free to use);
Linux
• Panoramio, geolocation-oriented photo sharing
website (free to use);
• YouTube, video content sharing website (free to
use);
Web Browser • Wikipedia, the free encyclopedia

Operating System VI. TESTING


Client side
The palic.in web application passed the following tests:
Figure 5. Software stack on server and client side
• Cross-browser compatibility testing; addresses
browser compatibility and operating system
The following technologies are used: compatibility
• Functionality testing; covers basic web site
• XHTML markup language functionality as links, forms for information
• CSS style sheet language submitting, database connections, cookies
• XML markup language • Usability testing; covers user interface and
• JavaScript language navigation
• AJAX (Asynchronous JavaScript and XML) • Interface testing; covers interaction between
application, web server and database server
• PHP scripting language
• Security testing; testing for potential
• SQL relational database language
vulnerabilities like XSS (cross-site scripting)
• jQuery JavaScript library
• Performance and stress testing; application
• Keyhole Markup Language (KML), XML-based
performance evaluation during high load and
language schema
user activity, testing application response on
• GeoRSS Geography Markup Language (GML) different internet connection speeds
The following techniques are used:
VII. CONCLUSION
• CSS overlays; User interface makes extensive This work describes an application developed with rapid
use of overlays. On this way we produced web development method. The realized application uses
flexible interface. and benefits of Google Maps API service. The
• Web Widgets; We used them for interactivity application was customized to a popular tourist
and to provide customized information to users. destination Paliü, hence the web site domain name

321
Authorized licensed use limited to: ULAKBIM UASL - Yeditepe Universitesi. Downloaded on March 15,2010 at 06:52:22 EDT from IEEE Xplore. Restrictions apply.
palic.in. The realized database is capable of storing user VIII. REFERENCES
and object profiles. Implemented expert system is based [1] Francis Rousseaux, Kevin Lhoste, "Rapid Software Prototyping
on a new fuzzy logic principle. Cluster training is Using Ajax and Google Map API," achi, pp.317-323, 2009 Second
performed with help of a permanent knowledge base. The International Conferences on Advances in Computer-Human
Interactions, 2009
completed application has successfully passed a few
[2] Martin C. Brown, “Hacking Google Maps and Google Earth”,
important testing phases. ISBN: 978-0-471-79009-9, 2006
[3] Google Maps API Documentation,
http://code.google.com/apis/maps/documentation/
[4] Mashups: The next major new software development model?,
http://blogs.zdnet.com/Hinchcliffe/?p=106
[5] Lixin Han, Guihai Chen “A fuzzy clustering method of
construction of ontology-based user profiles”, Advances in
Engineering Software 40 (2009) pp.535–540
[6] M. Takacs, “Approximate reasoning based on distance based
operators and similarity measures, in Principles of Fuzzy
Preference Modelling and Decision Making“, edited by Bernard
de Baets and Janos Fodor, Academic Press, Gent, 2003, ISBN 90-
382-0567-8, pp: 83-94.

322
Authorized licensed use limited to: ULAKBIM UASL - Yeditepe Universitesi. Downloaded on March 15,2010 at 06:52:22 EDT from IEEE Xplore. Restrictions apply.

Вам также может понравиться