[Mapserver-users] Perl Mapscript - render shapefile with no m ap

Simpson, Andrew Andrew.Simpson at ssc.nasa.gov
Tue Mar 11 10:58:08 EST 2003


What I'd like to do is render a map using Perl mapscript only, without
static or dynamic map files, and without stepping through the shapes.
I know I should just go with one of these two work arounds, but the code to
do this seems to be available and I would like to avoid the overhead of
creating/deleting map files.

Thanks for your reply,
Drew.

P.S. Sorry for the double post, I had E-Mail alias problems.

-----Original Message-----
From: Lowell Filak [mailto:lfilak at medinaco.org]
Sent: Tuesday, March 11, 2003 8:54 AM
To: Simpson, Andrew; 'mapserver-users at lists.gis.umn.edu'
Subject: Re: [Mapserver-users] Perl Mapscript - render shapefile with no
map


I may be missing the question but:
What you are trying to do does work.
If you dynamically create a mapfile and include a 'place-holder' layer
definition and then set the $layer->{data} on the fly it does work.
Being that you are trying to set the $layer->{data} dynamically does that
mean you are trying to set the 'data' to a shapefile that was just created?
If so you will want to make sure that the data.shp has a corresponding
data.dbf file to go with it or the $layer->{data} = 'data' will fail.
HTH
Lowell F.

The following message was sent by "Simpson, Andrew"
<Andrew.Simpson at ssc.nasa.gov> on Mon, 10 Mar 2003 16:22:24 -0600.

> Greetings,
>  
> Has anyone had any success rendering a map using Perl mapscript and a
> shapefile with no map file and without having to open the shapefile and
step
> through and draw every shape.
> I have had success instantiating a map object with dynamically generated
map
> files.
> I have also had success manually opening the shapefile and iterating
through
> the shapes rendering each, but this is cumbersome and does not take
> advantage of tiling.
> I have not been able render a map by just setting the layer->{data}
> attribute to a shapefile.
> Is this possible?
>  
> Thanks for any help,
> Drew.
> 
>  
>  
> 




More information about the mapserver-users mailing list