[Mapserver-users] Perl Mapscript - equivalent ofzoompointmethod..?

Lowell Filak lfilak at medinaco.org
Tue Jul 15 15:38:38 EDT 2003


Great!
I hate reinventing things, unless of course the original wasn't Open Source.
Lowell

The following message was sent by "Steve Lime"
<steve.lime at dnr.state.mn.us> on Mon, 14 Jul 2003 16:29:18 -0500.

> Note that before the end of the week I intend to take the popular PHP
> mapscript methods and SWIGify them. We want the versions inline as much
> as possible for the 4.0 release.
> 
> Steve
> 
> >>> "Lowell Filak" <lfilak at medinaco.org> 07/10/03 10:32AM >>>
> Actually I recall a discussion with a fellow PerlMapScript user at MUM
> who was thinking of "packaging" some of these more frequently
> requested
> routines.
> Unfortunately I have a hard time remembering my own name when things
> are
>   busy so I have forgotten who it was.
> Would the appropriate person be willing to comment on the status of
> such
> a package?
> Thanks.
> Lowell
> 
> The following message was sent by Eric Bridger <eric at gomoos.org> on
> Thu,
> 10 Jul 2003 09:44:41 -0400.
> 
> > Ali,
> > In the Wiki, mapquakes.pl example:
> > 
> http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PerlMapScriptExamples35ex2
> 
> there is a function called set_extent() which takes the users mouse
> click and zooms the map to that point.  Is that what you need?
> > If no zoom is set, $zoom_dir == 0,  then this functions as a pan
> tool,
> recentering the map.
> > 
> > Steve Lime wrote mapquakes.pl.  I also adapted some javascript of
> his
> into Perl to handle pan direction buttons.  This just adjusts the
> mouse
> click image coordinates which then must be passed to set_exent().
> > 
> > sub pan_to_map {
> >     my ($map, $direction) = @_;
> >     my $pansize = .50;
> >     my ($x, $y) = (0,0);
> >     my $width = $map->{width};
> >     my $height = $map->{height};
> > 
> >     if($direction eq 'n') {
> >       $x = ($width-1)/2.0;
> >       $y = 0 - ($height * $pansize)/2.0;
> >     } elsif($direction eq 'nw') {
> >       $x = 0 - ($width * $pansize)/2.0;
> >       $y = 0 - ($height * $pansize)/2.0;
> >     } elsif($direction eq 'ne') {
> >       $x = ($width-1) + ($width * $pansize)/2.0;
> >       $y = 0 - ($height * $pansize)/2.0;
> >     } elsif($direction eq 's') {
> >       $x = ($width-1)/2.0;
> >       $y = ($height-1) + ($height * $pansize)/2.0;
> >     } elsif($direction eq 'sw') {
> >       $x = 0 - ($width * $pansize)/2.0;
> >       $y = ($height-1) + ($height * $pansize)/2.0;
> >     } elsif($direction eq 'se') {
> >       $x = ($width-1) + ($width * $pansize)/2.0;
> >       $y = ($height-1) + ($height * $pansize)/2.0;
> >     } elsif($direction eq 'e') {
> >       $x = ($width-1) + ($width * $pansize)/2.0;
> >       $y = ($height-1)/2.0;
> >     } elsif($direction eq 'w') {
> >       $x = 0 - ($width * $pansize)/2.0;
> >       $y = ($height-1)/2.0;
> >     }
> >     $x = int($x);
> >     $y = int($y);
> > 
> >     return($x, $y);
> > }
> > 
> > Eric
> > 
> > 
> > At 12:37 PM 07/10/2003 +0100, AMC Story wrote:
> > >Hi there everyone,
> > >
> > >I'm using Perl Mapscript to develop the interface of my
> application,
> and have 
> > >very kindly been given some existing code to work from from another
> member of 
> > >the list.  The code that I am making reference to is written using
> PHP 
> > >Mapscript, so I'm having a little bit of trouble in that not all of
> the methods 
> > >available with PHP Mapscript are available with the Perl version.
> > >
> > >I'm dealing with my panning buttons at the moment, and the example
> I
> have 
> > >defines a point object which the new map will zoom to, and then uses
> the 
> > >zoompoint method of the map object.  This method isn't available in
> Perl, does 
> > >anyone have any suggestions as to how I might get around this? 
> Similarly, 
> > >their zoomin function makes use of the zoomrectangle method...
> > >
> > >Thanks for any light you can shed on this.
> > >Ali 
> > >_______________________________________________
> > >Mapserver-users mailing list
> > >Mapserver-users at lists.gis.umn.edu 
> > >http://lists.gis.umn.edu/mailman/listinfo/mapserver-users 
> > 
> > _______________________________________________
> > Mapserver-users mailing list
> > Mapserver-users at lists.gis.umn.edu 
> > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users 
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu 
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list