[Mapserver-users] Re: [Mapserver-dev] (2nd) Displaying a layer generated "on the fly" in a map
Daniel Morissette
dmorissette at dmsolutions.ca
Mon Mar 8 17:39:44 PST 2004
Thomas Shaw Obregón wrote:
> (I'm sending this question for second time, to be sure it was sent
> successfuly to the mailing list)
>
You would have more chances of getting replies on usage questions on the
mapserver-users list. The mapserver-dev list is for the MapServer
developers to discuss development issues and not for users support.
I have sent this reply to mapserver-users.
>
> Hello, I'm now using mapserver4 and I have 3 layers in a map that I can
> pefectly visualize, the way I'm doing it is with the php-mapscript. Those
> 3 layers are in shp format, but I also have to generate a new layer with
> some data inserted in a data base. The DB has 3 fields
> (latitude,longitude,price).
> I read the DB record by record and I'm generating the layer 4 "on the
> Fly", when I finish it,I save it to the hard disk, but when I try to
> visualize it doesn't appears in the map, there only appears the first
> three layers. How can I do to visualize that 4rth layer in the map?
>
> I'll appreciate a lot if anyone can help me with this.
I assume that the 4th layer is a shapefile+DBF that you create using PHP
MapScript and the PHP xbase module?
Assuming that the data that you write to the shapefile+dbf is valid and
that all the settings in you layer definition are correct, the other
thing to check would be making sure that the shapefile is closed
properly before you attempt to add it to the layer and draw the map
(i.e. using $shapefile->free()). If the shapefile is not properly closed
then the header may not be valid on disk and that could explain why
MapServer can't draw it.
HTH
Daniel
--
------------------------------------------------------------
Daniel Morissette dmorissette at dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
More information about the MapServer-users
mailing list