[maplab-users] phpmapscript error

jive jive at aino.com.tw
Wed Jun 9 08:30:21 EDT 2004

    I have compile mapserver 4.0.1 and phpmapscript succesful with vc6 and install on my server(windows 2003) well.
    I use phpmapscript to get map,it works fine,but when I use functions to get legend and scalebar,it is fail,and its error log 
    is PHP "Fatal error:  Call to a member function on a non-object in c:\apache\htdocs\test_draw_map.phtml on line 57".
    What is wrong  with it?
    Here is my php code:
  <H1>PHP/MapScript module test</H1>
  $map = ms_newMapObj($map_path."mymap.map");

  $img = $map->draw();
  $url = $img->saveWebImage(MS_PNG, 0, 0, 0);
  printf("<IMG SRC=%s WIDTH=%d HEIGHT=%d>\n", $url, $map->width, $map->height);

  $img = $map->drawLegend();
  $url = $img->saveWebImage(MS_PNG, 0, 0, 0);
  printf("<P><IMG SRC=%s>\n", $url);

  $img = $map->drawScaleBar();
  $url = $img->saveWebImage(MS_PNG, 0, 0, 0);
  printf("<P><IMG SRC=%s>\n", $url);
Jive Chang
Project Manager
E-mail:jive at aino.com.tw
7F, No. 100, Sec. 3, Chung Hsiao East Road, Taipei 106, Taiwan, R.O.C.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/maplab-users/attachments/20040609/038af50d/attachment.htm

More information about the Maplab-users mailing list