Directions Magazine
Hello. Login | Register
Upcoming

Features

All Features

Serving Maps with Linux; Part I

Thursday, April 1st 1999
Read More About:
Classified Ads:
Linux is one of the hot technology topics these days, and the mapping world is no exception. A recent Linux thread on the popular MapInfo-L discussion list led Steve Lombardi to look at Linux and map-serving software. Steve, whose day job finds him in charge of MapInfo's internet product line, kept a diary for us. Here, in part one of this two part series, Steve installs Linux, then MapXtreme, and serves his first map.
-------------------------------------

Those of you who get the Ziff Davis channel, ZDTV, may be familiar with 'The Screensavers'. I must confess, I'm a regular viewer. It's like ESPN for geeks. Anyway, Kate and Leo convinced me that Linux wasn't rocket science, and to try it out.

A weekend project was born: Make my Windows NT laptop dual boot Linux and install MapXtreme Java edition. Further, install a Web server capable of handling Java Servlet's and publish a mapping servlet allowing web surfers to browse interactive live maps.

If you want to try it out yourself, here's my diary. And don't be timid - it's really quite straightforward. My only prior Linux experience was getting the 68k version installed and almost running on my Amiga some years ago, so I'd put myself in the novice category.

Saturday, 9:30 am.
If you have a machine that you want to dedicate to linux, you can skip ahead to the next step. However, If you have an existing NT/95 machine that you want to dual boot Linux, proceed here. You need to create a new partition on your hard disk for Linux. I picked up a copy of Partition Magic at CompUsa for 50 bucks to make this step a no brainer, but there are shareware equivilants. Partition Magic is nice in that it can cut out a chunk of free space from an existing partition, format the new partition as Linux, and shrink the other partition down all in one step. In my case, I had a 5 gig NTFS partition on my laptop, 3 gigs were free. I told Partition Magic to make me a 1 gig linux partition and a 200 meg 'Swap' partition (for Linux virtual memory). Also, I told Partition magic to mark it as a 'Primary' partition. This makes your life easier during the next step.

Saturday, 11:30 am.
Install Linux. If you're hard core, you can download the source and compile it yourself; I took the easy way out and went with a commercial distribution. I strongly recommend doing the same, unless you have some experience in this area. There are a number of commercial Linux distributions around; I went with Red Hat's for 35 bucks. Nice install manual. Also, Red Hat adds a lot of value in making the install completely painless. I told my Bios to boot from the CDROM, stuck the disk in and booted, answered some simple install questions, and waited for the install to complete. This really impressed me. The install autodetected and configured absolutely everything in my system, including my PCMCIA modem and ethernet card!

Saturday, 1:30 pm.
Configure LILO. This is the LInux LOader. You can do this as part of the install (I did) or later from within Linux. When your system is powered up, LILO will be run before any OS is booted. You have the option to specify the OS to boot at that time. I configured LILO to start NT by default, and Linux as an option.

Saturday, 1:45 pm.
Start Linux and create a user account. If you don't have any Unix experience, you can safely rely on the Red Hat installation guide for explanations. Start X windows with the startx command. This will put you in the default window manager, very similar in look and feel to windows 95.

Saturday, 2:00 pm
Start your browser and go to BlackDown's website (http://www.blackdown.org) to get a Java VM (Virtual Machine). Download and install it. At the time of my install, JDK 1.1.7 was the latest and greatest, but today the full release of JDK 1.2 (Also known as Java 2) is available for download - either will work fine. Instructions for installation are at the BlackDown site and are very straightforward.

Saturday, 3:00 pm
Download the evalution version of MapXtreme Java edition from http://testdrive.mapinfo.com/mapxtremejava There are 2 archives in the download area that you will want. The main archive contains the software and sample applications. A separate maps archive contains some sample TAB files in the event you don't have any map data. The MapXtreme Java edition installer is a java application itself. Go to the directory in which you downloaded the archive and launch the installer from the command line like this:

jre -cp install.zip install

The graphical interface will start and guide you through the installation. This too is straightforward.

You will then want to decompress the maps archive somewhere on your harddrive. It doesn't matter where, I would suggest creating a maps directory below the directory where you installed MapXtreme.

Saturday, 3:30 pm
Time to finally make some maps! Remember, you don't need a web server at all to view maps locally. In part II, we'll add a webserver and server based mapping application into the mix so that live maps can be viewed over the internet, but right now we simply want to view some maps locally to make sure everything is installed correctly. Start the MapXtreme server from the command line. Here's a sample command line; substitute the paths appropriate for your installation:

jre -cp /opt/mapinfo/server:. com.mapinfo.mapxtreme.MapXtremeApp -c/opt/mapinfo/server/MapXtremeApp.cfg -s /opt/mapinfo/server/Security.cfg -a /opt/mapinfo/server/AppSupport.cfg -debug

You can now run any client application that has the MapJ object in it. Our MapXtreme administrator is one such application. It is a Java application with a GUI for setting up some preferences for the server. It also allows you to load geoset's and tab files. A command line to start this administrator would look something like this:

jre -cp /opt/mapinfo/server/ThirdParty/symantec/
symbeans.jar:/opt/mapinfo/server
:.com.mapinfo.mapxtreme.admintool.MXTJAdmin

Go to the 'Map' tab of the administrator. Load world.gst, and in a second or two you'll be looking at an interactive map of the world that should look something like the screenshot shown here.

Congratulations! And in my case it's still Saturday!

Next you may want to have a look in the samples/java directory of your installation. You'll find a stand-alone Map viewing application complete with source code. You can run it as is, or edit the .Java source file, customize the application, and re-compile. It's a map viewer of sorts: loads geosets and tabs and runs anywhere.

Best of luck. In Part Two I'll show you how I spent my Sunday installing Web server on Linux, and deploying a live internet mapping application as a Java servlet that works with the MapXtreme server we just installed!

On to Part Two.


Bookmark and Share


stay connected

Twitter RSS Facebook LinkedIn Delicious Apple Devices Android Blackberry

newsletter

Get the Daily Newsletter with the latest technology headlines and feature articles. Enter your email address.

Preview | Archive






recent comments

Towards a Global Licensing Framework for Geospatial Data

Is it time for a global licensing framework for geospatial data? The GSDI Legal and Economic Working group thinks so and offered a presentation and a way forward at the GSDI 13 conference held in Quebec City in May. The effort aims to harmonize existing licensing without changing fundamental access policies and funding models and be compatible with the diferences in national legal systems. That's a tall order, but an important one as the world moves toward geodata sharing. Geoff Zeiss reports.

Can Geofeedia Provide Location-based Citizen Input to Journalists?
Podcast: Kickstarter and Geography
Project Report for GISCorps: Geocoding Locations of NGOs in Sierra Leone
Bike Score Rates (and Maps) Bikeability
Intergraph’s SG&I President John Graham Talks about Hexagon 2012
Retail Mapping: Leveraging the Power of Location Intelligence for a Telecommunications Provider - Part Two
PolyZoom: See Details of Map Along with Context
Podcast: The Value of Geospatial Companies

DirectionsMag.com

About Us | Advertise | Contact Us | Web Terms & Conditions | Privacy Policy
© 2012 Directions Media. All Rights Reserved, 194 Green Bay Road, Glencoe, IL 60022