Re: geoTiff Application



I am going to see if I can attach that to Gnome2::Canvas. In the mean time I have started to add the ability to remove waypoints. so far I have this code:
#remove waypoints
    if ($event->type eq "button-press" && $event->button == 3){
        print "right click\n";
        foreach (@drop){
            print $_,"\n";
        }
        foreach (@drop){
            my ($x1, $y1, $x2, $y2) = $_->get_bounds;
            #print "$x1, $y1, $x2, $y2\n";
            if ($event->x >= $x1 && $event->x <= $x2 && $event->y >= $y1 && $event->y <= $y2){
                print "In Bounds!!\n";
                delete $_;
            }
        }
        foreach (@drop){
            print $_,"\n";
            $_->request_update;
        }
    }
With this the user can right click over a waypoint and it will be removed. I'm struggling with this a bit. I want to be able to remove the array reference that the user has clicked over and redraw the waypoints (at least I think this is how it should work). How can I remove the array reference? How can I redraw the waypoints?


On Mon, Jun 2, 2008 at 1:22 AM, Jeffrey Ratcliffe <jeffrey ratcliffe gmail com> wrote:
2008/6/2 Jamie Lahowetz <jlahowe2 bigred unl edu>:
> I am writing a simple Gtk2 application that loads a geotiff and allows the
> user to add and remove waypoints. So far the user can add a waypoint by
> double clicking and is able to drag the window to navigate. I would like to
> see if anyone can help me with adding some of the other features.
> 1. ZOOMING. I added a zooming feature to the map but when you zoom in or out
> and try to add a waypoint, the circle is far off from where the user
> clicked. Can anyone give examples on how to fix this? (thanks to zentara for
> the help)

I very much recommend the use of Gtk2::ImageView
(http://trac.bjourne.webfactional.com/) as an image viewing widget,
which will sort out all the zooming, panning, selecting for you.

Regards

Jeff
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list



--
Jamie Ryan Lahowetz
University of Nebraska - Lincoln
Graduate Student - Geosciences
402.304.0766
jlahowe2 bigred unl edu

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]