[mapserver-users] Getting introduced to MapScript

Luís de Sousa luis.a.de.sousa at gmail.com
Fri Aug 3 00:55:41 PDT 2012


Hi Cristiano, thank you for the reply.

I'm precisely trying to build a wrapper API for the specific where you a GML
file and want to automatically publish it through MapServer.

If I understand correctly from your message there is no way set the layer
TYPE attribute directly. Is this the same with the DATA attribute? In such
case how can it be set?

Thank you,

Luís


On 2 August 2012 14:37, Cristiano Sumariva <sumariva at gmail.com> wrote:
> Well if you have time to do it, I strong suggest you to create a thin
> wrapper about mapscript. This is for case you can have a safe, programmer
> friendly API.
> Or at least create a Factory class for some mapscript constructs. This
> will
> save you of much trouble in future when you going need change something.
>
> For your commented object layerObj the mapscript function or method to
> creating a new layer would be new layer( parent ).
> What would lead you to map draw failure because layerobj type was not set.
>
> So use a factory like LayerFactory.createPolygon( mapobj ) that will set
> things properly.
>
> I guess the minimum mapfile stuff required are:
> - map size output
> - map ground coordinates position
> - one layer obj( a lot of attributes set here )
> -- one class at layerobj( a few atrtibutes set here )
> --- one style at above class( presentation, color stuff here )
>
> optional
> if going work with different projections
> - the map projetion attribute
> - for each layer the projection attribute.
>
> Again would be very nice to have a wrapper that raise error you if have a
> layer without projection attribute in presence of it at map object.



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Getting-introduced-to-MapScript-tp4992463p4992866.html
Sent from the Mapserver - User mailing list archive at Nabble.com.


More information about the mapserver-users mailing list