classObj, pointObj, & projectionObj:
my $class = $layer->getClass(0);
my $point = new mapscript::pointObj();
my $in_proj = new mapscript::projectionObj('proj=latlong,datum=NAD83');
my $out_proj = new mapscript::projectionObj('proj=lcc,datumn=NAD27, \
units=ft,lon_0=-82.5,lat_0=39.666666667, \
lat_1=40.433333333,lat_2=41.433333333, \
x_0=609601.21920,y_0=0');
if ( $vehicle_stop <= 1 ) {
$class->{color} = $map->addColor(0,255,0);
}
else {
$class->{color} = $map->addColor(255,0,0);
}
$point->{x} = $long;
$point->{y} = $lat;
$point->project($in_proj,$out_proj);
|
Live GPS Readings of Vehicle on Map
|