Re: [OpenMap Users] Zoom extents

From: Don Dietrick <>
Date: Wed, 24 Aug 2005 10:57:55 -0400

Hi Cap,

On Aug 18, 2005, at 2:42 PM, Cap Romano (IMBEL) wrote:

> Hello all,
> is it possible to perform a zoom to map full extents?

Yes, you need to set the scale of the Projection object on the
MapBean. You can ask a Projection object what it's scale would need
to be to encompass a coordinate box (getScale(...)).

> I think that I need to grab the extents of all layer. First
> question, is is
> possible? Is there a MapBean.getEnvelope or MapBean.getDataBounds
> method?

The Projection object of the MapBean will tell you that information.

> Also I will need to reproject the map. Why there is no setXXX
> methods in
> Projection interface?

The Projection class is what is passed to layers, and they are not
allowed to manage it independently from the MapBean, because that
would mess up the other layers. You need to make the settings on the
MapBean, and the changes will flow to the layers.

> Is there a reproject( Databounds ) method in Proj class?

That would be the getScale(..) method that takes arguments, and then
you would set the MapBean's scale to that.

Hope this helps,


Don Dietrick,
BBN Technologies, Cambridge, MA

[To unsubscribe to this list send an email to ""
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed Aug 24 2005 - 10:58:16 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:07 EDT