Re: [OpenMap Users] Zoom extents

From: Cap Romano (IMBEL) <"Cap>
Date: Thu, 25 Aug 2005 10:07:53 -0300

Hi Don,

Don Dietrick escreveu:
> 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(...)).

But how do I get a coordinate box the fits all my layers?

>
>> 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.

How?

A new question: I have a shapefile that is saved using a specific coordinate
system. Its coordinate system is saved in a shape.prj file, but I noticed
OpenMap does not load this file and the ShapeLayer Projection object is always
null before I add it to the MapBean.
The question is, how is OpenMap´s support to coordinate system? Can I set a
coordinate system to a layer different than the one I set to the MapBean? Will
it reproject the layer´s geometry coordinates before drawing?

Thank you,
Romano Magacho


>
>> 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
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Don Dietrick, dietrick_at_bbn.com
> BBN Technologies, Cambridge, MA
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
>
>
>

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Thu Aug 25 2005 - 09:50:08 EDT

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