[mapserver-users] confusion about postgis bounding box -> valid map extent
   
    Alex Rice
     
    alex_rice@arc.to
       
    Fri, 23 Aug 2002 16:33:44 -0600
    
    
  
On Friday, August 23, 2002, at 01:27  PM, Steve Lime wrote:
> In the C code the extent will be adjusted for output image size.
Does it try to center the old extent in the new extent, or does 
it do clipping and shifting?
> I've got all those written in C and javascript. Let me know what 
> you'd like
> to see. Otherwise MapScript already has a method to fit a rectangle to
> a new window size. It's part of the rectObj class (of which 
> extent is one)
> and is called fit. For example:
>
>   $cellsize = $map->{extent}->fit($newwidth, $newheight);
I would love to see any javascript functions you have. It's a bit 
easier to read then C for me.
> Already addressed in a generic way with the fit method.
OK I see. I guess what I am looking for is a way to do what the 
zoomScale() php function does, except I will be starting with 
georef coordinates not pixel coordinates.
Maybe after seeing some of your code it will all "click" for me!
Thanks,
Alex Rice <alex@mindlube.com>
Mindlube Software
http://www.mindlube.com/