Google Maps and Google Talk Integration: GoWhere
Introduction
GoWhere is an experimental collaborative mapping tool which combines
online mapping and chat technologies.
Two users with chat accounts can plot points, move the map, zoom the map, and change the map type.
This is in the early experimental stages and I'm sure there are many improvements to be made.
See "Future" below for a wish-list of future enhancements.
Prerequisites
You'll want these prerequisites to run GoWhere:
- Latest Java2 Standard Edition Runtime, available from here
for PC, Linux, or, was available as a System Update for OSX on 4/17/06.
- Two XMMP chat accounts, two people with accounts, etc.
These can be GoogleTalk accounts or other "Jabber" accounts that use this technology.
If you intend to build GoWhere for yourself, download the source below.
Please note that when you first run the Java Applet, you must be willing to accept the certificate that pops up in order for
GoWhere to run. With good reason, Java places security restrictions on what Applets are not allowed to
access on a client machine. For instance, file access and network access are normally not allowed. Typically,
software companies get a third party "Certificate Authority" to "sign" the software... i.e.,
vouch for the integrity of the code in question.
An alternative is to self-sign the Java Applet, which I have done here.
It's certainly allowed and is done all the time, but understand
that it does rather defeat the purpose of having a signer in the first-place. You can read more about
signed Applets here.
All code used for GoWhere is under the GNU General Public License.
Source code is available below.
Usage
GoWhere's chat window is very simple and it was not my intention to create a full-fledged chat program.
(See JBother for a fully fledged Smack-API Java chat program).
Here's basic usage:
- You and another person will need to have chat accounts.
- You need to add your friend to your Roster/Buddy-List using your native program (i.e. GoogleTalk, gaim, etc.)
GoWhere's chat pane does not currently have a facility for doing this, though it does rely on your Buddy List
to determine who you can chat with.
-
Log In to your chat accounts. On the Login tab. If the login is successful, the title will say "logged in".
Check with your chat provider for the proper settings.
If Service is left blank, the Server setting will be used. Note
that if you need to use a SSL connection, see the Options Tab.
Google Talk settings are as follows (subject to change):
- Screen Name: your GMail user name
- Password: your GMail password
- Server: talk.google.com
- Port: 5222
- Service: gmail.com
- (no SSL connection is necessary)
-
Switch to the "Chat" tab. You need to select a user to chat with by RIGHT-CLICKING (OSX ctrl-click)
on the compose-area (bottom area) of the chat pane. Currently, only a single (non-group) conversation
is possible. The title of the compose area will change once a user is selected.
-
Now, two users should be able to hold a chat text session. Type in the compose area, hit "Send" or the return key.
This is very bare-bones chat client, so no bells and whistles here! ;)
-
To begin collaborating using the map, you must check the "Allow modification of my map" box in order
to allow your buddy to change YOUR map. (He will need to do the same if you are to change his)
-
Map actions are now linked. If your buddy has clicked to "Allow modification of my map" box, you will be able to:
- Single-Click on your map to add map points.
Points you add are colored green, points added by your chat buddy are red.
- Drag or zoom the map to change the location
- Change the type of map
- Push the "Sync" button to send all of your settings to your chat buddy.
WARNING: THIS will reset his map and erase any points he has added
-
For more advanced users, note that there is a debug tab that is hidden by default (See Options tab).
The chat client may be run in stand-alone mode too. This is without any maps of course, but it is useful for testing.
How It Works
The mapping function is implemented thanks to the
Google Maps API and is
written using JavaScript callbacks. The chat function uses
the excellent Java XMMP API, Smack, from JiveSoftware.
Events on the map are tied to callbacks in JavaScript. These callbacks call Java functions which build and send
custom XMMP Extension messages to trigger remote map events. On the receiving side, the custom XMMP message is
received, parsed, and JavaScript callbacks manipulated the Google Maps API accordingly.
Code
The source code may be downloaded as a bzip2 tar archive
here.
Future
There is certainly room for future improvements and bug fixes. Here are some ideas, not necessarily in order:
Contact
Questions, comments: j c o o l e y (at) m e d i a (dot) m i t (dot) e d u
<-- back