[mapserver-users] create mapObj without map file
Tamas Szekeres
szekerest at gmail.com
Sun Feb 1 07:38:50 PST 2009
Hi Ionut,
You could create a map object without having to load a mapfile something
like this:
mapObj map = new mapObj(null);
map.name = "testmap";
map.extent = new
rectObj(313448.426748,7345979.999602,360571.684951,7413999.938403,0);
map..units = MS_UNITS.MS_METERS;
map.height = 400;
map.width = 400;
map.
layerObj layer = new layerObj(map);
layer.connectiontype = MS_CONNECTION_TYPE.MS_OGR;
layer.type = MS_LAYER_TYPE.MS_LAYER_LINE;
layer.connection = "[my ogr connection]";
layer.status = mapscript.MS_ON;
classObj class_obj = new classObj(layer);
styleObj style= new styleObj(class_obj);
style.color = new colorObj(0, 0, 255, 0);
style.size = 10;
etc.
See http://mapserver.org/mapscript/mapscript.html for more information about
the API.
Best regards,
Tamas
2009/2/1 sandric ionut <sandricionut at yahoo.com>
>
> Hello:
>
> Is it possible to create a mapObj object without having a map file? and
> than create layers and define symbology and everything for each layer, than
> add the layer to the map?
>
> I am trying to eliminate the need of having the map file and read from that
> map file
>
> Thank you,
>
> Ionut
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090201/6e7a775c/attachment.htm>
More information about the MapServer-users
mailing list