[Mapserver-users] MapServer ImageMap feature
Dave Astolfo
dastolfo1 at cogeco.ca
Wed Feb 18 03:05:50 PST 2004
Hi,
I am trying to implement client-side Image Maps using the ImageMap
sample provided on the MapServer Wiki
(http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?ImageMap). I am using the
GMAP demo and am getting this error:
Warning: [MapServer Error]: msDrawMap(): Unable to initialize image. in
C:\MapServerTools\GMAP_Sample\htdocs\gmap75.inc.php on line 576
Fatal error: Call to a member function on a non-object in
C:\MapServerTools\GMAP_Sample\htdocs\gmap75.inc.php on line 579
The code that is throwing this error is listed at the bottom of this
message. Specifically, it is complaining first about this:
$img2 = $gpoMap2->draw();
and then this:
$url2 = $img2->saveWebImage(MS_IMAGEMAP,1,1,0);
It does not seem to like my calling the draw() or saveWebImage functions
more than once as it works when these two lines are commented. Any idea?
Thanks,
Dave
CODE:
function GMapDrawMap()
{
GLOBAL $gpoMap, $gpoMap2, $gbShowQueryResults;
GLOBAL $gbIsHtmlMode;
GLOBAL $gszCommand, $gszZoomBoxExt;
GLOBAL $gAppletImgFmt, $gImagesFmt;
if ($gbShowQueryResults)
{
$img = $gpoMap->drawQuery();
//$img2 = $gpoMap2->drawQuery();
}
else
$img = $gpoMap->draw();
$img2 = $gpoMap2->draw();
$url = $img->saveWebImage($gAppletImgFmt, 0, 0, -1);
$url2 = $img2->saveWebImage(MS_IMAGEMAP,1,1,0);
.... more code......
More information about the MapServer-users
mailing list