[Thread Prev][Thread Next][Index]
Re: Problem adding another map image
Hi Martin,
Thank you for the note. The change that was made to LASServlet.pm was a little
different than yours below.
OLD: line 820
$LAS::ServletDB::UI::LiveMap::Images{$image_url} = $image_id;
#Code to detect corrupted images
my $dbh = $db->{dbh};
my $cursor = $dbh->prepare("SELECT image FROM Images WHERE oid = 1");
NEW:
$LAS::ServletDB::UI::LiveMap::Images{$image_url} = $image_id;
my $last_image = $db->lastInserted;
#Code to detect corrupted images
my $dbh = $db->{dbh};
my $cursor = $dbh->prepare("SELECT image FROM Images WHERE oid =
$last_image");
------------------
Joe McLean
Martin Dix wrote:
> We have both global and regional model data so I want to use two
> different map images. I set up seperate UI defaults for the regional
> dataset following the documentation.
>
> However, running genLas.pl gave an error from LASServlet.pm
> "Integrity check failed". (Note, I'm using LAS 6.1).
>
> My perl and SQL knowledge is pretty meagre but the problem seems to be
> that it's comparing the most recently inserted image to the first one
> rather than to itself.
>
> Changing the line
> my $cursor = $dbh->prepare("SELECT image FROM Images WHERE oid = 1");
> to
> my $cursor = $dbh->prepare("SELECT image FROM Images WHERE oid =
> $image_id");
> makes the whole thing work properly.
>
> Martin Dix
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement