~ubuntu-branches/ubuntu/jaunty/mapserver/jaunty-updates

« back to all changes in this revision

Viewing changes to mapscript/php3/examples/test_draw_legend_icon.phtml

  • Committer: Bazaar Package Importer
  • Author(s): Fabio Tranchitella
  • Date: 2006-11-02 11:44:17 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20061102114417-pnutjb20kqzl23ua
Tags: 4.10.0-3
debian/control: build-depends on libpq-dev. (Closes: #396565)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
//
20
20
if (PHP_OS == "WINNT" || PHP_OS == "WIN32")
21
21
{
22
 
  dl("php3_mapscript.dll");
 
22
  dl("php_mapscript.dll");
23
23
}
24
24
else
25
25
{
31
31
//
32
32
// You can download the MapServer demo data from http://mapserver.gis.umn.edu/
33
33
//
34
 
$map = ms_newMapObj("/home/msapps/gmap/htdocs/gmap75.map");
 
34
$map = ms_newMapObj("gmap75.map");
35
35
 
36
36
// print $map->numlayers;
37
37
// phpinfo();
45
45
//
46
46
$img = $map->draw();
47
47
 
48
 
$url = $img->saveWebImage(MS_PNG, 0, 0, 0);
 
48
$url = $img->saveWebImage();
49
49
printf("<IMG SRC=%s WIDTH=%d HEIGHT=%d>\n", $url, $map->width, $map->height);
50
50
 
51
51
//
52
52
// LEGEND
53
53
//
54
54
$img = $map->drawLegend();
55
 
$url = $img->saveWebImage(MS_PNG, 0, 0, 0);
 
55
$url = $img->saveWebImage();
56
56
printf("<P>Draw into one picture.<BR><IMG SRC=%s>\n", $url);
57
57
 
58
58
// Draw all legend icon from all class in all layers
68
68
          $myClass = $layer->GetClass($j);
69
69
        
70
70
          $img = $myClass->createLegendIcon($map->keysizex, $map->keysizey);
71
 
          $url = $img->saveWebImage(MS_PNG, 0, 0, 0);
 
71
          $url = $img->saveWebImage();
72
72
          
73
73
          printf("<TR><TD><IMG SRC=%s></TD><TD>%s</TD></TR>", $url, $myClass->name);
74
74
      }
81
81
// SCALE BAR
82
82
//
83
83
$img = $map->drawScaleBar();
84
 
$url = $img->saveWebImage(MS_PNG, 0, 0, 0);
 
84
$url = $img->saveWebImage();
85
85
printf("<P><IMG SRC=%s>\n", $url);
86
86
 
87
87
?>