#!/usr/bin/perl -w

#use strict;

use mapscript;

my $filename = "/export/home/cats/shapefiles/france/mapfile.map";


my $map = new mapscript::mapObj($filename);

my $layer = new mapscript::layerObj($map);
$layer->{name} = "Trucmuche";
$layer->{status} = MS_ON;
$layer->{type} = MS_LAYER_POINT;

my $class = new mapscript::classObj($layer);

my $style = new mapscript::styleObj($class);
$style->{symbolname} = "Square";
$style->{size} = 150;
$style->{color}->setRGB(255, 0, 0);
$style->{outlinecolor}->setRGB(0,0,0);

my $point = new mapscript::pointObj(600300, 2429000);

$layer->addFeature($point->toShape());


print "Content-type: image/png;\n\n";

my $img = $map->draw();
$img->write();
