Re: Zooming in Applet with openmap

From: Don Dietrick <dietrick@bbn.com>
Date: Wed May 09 2001 - 13:02:03 EDT

"Rajesh.M" wrote:
>
> Hi Don,
>
> That was an express reply and thanks for the same.
> I did run the SimpleHttpImageServer and was able to create images on browser
> but in this case the output from the SimpleHttpImageServer is a binary
> GIF/JPEG
> data, i guess which the browser displays. If i write an applet to read this
> GIG/JPG
> i think the applet would have to do mathematics of converting X1/Y1 - X2/Y2
> mouseclick
> events to Lat/Lon pairs for "Zooming on a rectangular area" .
> Am i right here?

Here's a long answer to a short question:

In the next release (shortly) there is going to be a concept of a PlugIn
re-introduced to the OpenMap toolkit. PlugIns have been a part of the
toolkit for a while, but buried in com.bbn.openmap.layer.pluin package.
I've dusted off the plugin package and moved it to com.bbn.openmap.plugin.

PlugIns, at the most basic level, are simple objects that know how to
take a projection, contact a data source, and provide a graphics list.
They can be used by the PlugInLayer. The PlugInLayer handles all the
Java JComponent requirements of the layer (SwingWorker threading, etc.),
and leaves the data management to the plugin.

Why do I mention this? In the next release, one of the plugins
available will be the com.bbn.openmap.plugin.shis.SHISPlugIn, which
knows how to talk to a SimpleHttpImageServer, and render the retrieved
image within the map. This plugin and the layer could be used in your applet.

> Is this kind of mathematics possible?

It's what that plugin does.

> On the other may i know what (objects?) the LinkServer sends to a client and
> what "Link"
> protocol is, so that i can customize LinkServer to a servlet .

The Link protocol is defined in the
com/bbn/openmap/layer/link/LinkProtocol.html document.

> Also am i right in thinking that the shapefiles are processed by LinkServer
> only and the applet
> does not need to download them from webserver?

You are right.

The next release will be available within a couple of weeks.

Cheers,

Don

> Regards
> rajesh.m
>
> Heloo Rajesh.M,
>
> The OpenMap applet can support what you are trying to do. Although with
> applets, you have to take care in choosing the source of your map data.
> Access to the client's local disk is forbidden, and some layers don't
> yet have the ability to use Java Resources as sources of data. That's
> where the Link package comes in. The
> com.bbn.openmap.layer.link.LinkLayer can communicate with a LinkServer
> to, among other things, get graphics to display for a given projection
> (zoom level, location, map size, etc). One more thing - the LinkServer
> has to be running on the same host that the applet was loaded from in
> order for the LinkLayer to contact it. Applet rules prevent an applet
> from contacting a machine other than the server host.
>
> If you want to hook OpenMap components to a servlet to create map
> images, check the com.bbn.openmap.image package, specifically the
> MapRequestHandler. If you want to see the MapRequestHandler used, the
> SimpleHttpImageServer uses it to create map images. If you start the
> SHIS and contact it on it's host and port, it will provide the format
> for a valid map request.
>
> Regards,
>
> Don
>
> > "Rajesh.M" wrote:
> >
> > Hi there,
> >
> > Greetings.
> > Iam a new user to openmap and need to figure out if my requirement is
> > possible.
> > I need to develop an applet which will display the geographical
> > map(say Political
> > map + ocean names + countries name) and over it display some objects
> > whose
> > properties(say colour) would change. My problem is i have to support
> > "zoom in"
> > for a selected area on the map. I want to know if i could do this with
> > openmap?
> > I took deep look at the mailing archives and found that there is a
> > package
> > "com.bbn.openmap.layers.link", from what i understand could be used to
> > "transfer graphic
> > objects between a ClientLink and a Linkserver over socket" am i on
> > the right track?
> > is it possible with these classes to reply back with the new
> > geographical map for the
> > x/y co-ordinates area selected for zoom
> > . If so is it possible to make the Linkserver a servlet and transfer
> > the data over HTTP? Would be glad to get a help and detailed reply
> > with information on using "Link"
> > package.
> >
> > Thx
> > Rajesh.m
>
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Donald Dietrick dietrick@bbn.com (617)873-3031 [FAX]4328
> BBN Technologies, 10 Moulton Street, Cambridge, MA 02138
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> --
> [To unsubscribe to this list send an email to "majdart@bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]
>
> --
> [To unsubscribe to this list send an email to "majdart@bbn.com"
> with the following text in the BODY of the message "unsubscribe openmap-users"]

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed May 9 13:03:08 2001

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:31 EDT