[mapserver-dev] A basic question about mapserver functions

Mauricio Herrera georazor at gmail.com
Thu Jul 23 04:59:43 EDT 2009


So thanks Julien and Paul.  Thanks for help me

Well I gonna try more specific with my doubt. I answered for each one





*Julien:*



Thanks for MapScript examples, but it did not help me. You say  “In short,
msLoadMapInternal loads the mapfile in a Map object and then msDrawMap is
called”. I looking for this exactly. But I don’t find “the intermediate
step”  between LoadMapInternal and msDrawMap. The Mapscript examples show
general function like $map = ms_newMapObj($map_path."europe.map") and
$image=$map->draw();, but internally others functions are requiered
..Actually I know:



1.-LoadMapInternal()->case LAYER: msGrowMapLayers()->initLayer()->
LoadLayer()

2.-LoadLayer()->case DATA:getString()->msValidateParameter->msLookupHashTable()
->msFree()

*3.- ¿?  the intermediate step or function*

4- msDrawmap()



*When or Where  DATA (layer->data) provides it’s string to DrawMap()? *


*Note: *Assuming that all variables of Map Object, Layer Object,Class Object
(CLASS, SYMBOL, EXTENT, SHAPEPATH, NAME, TYPE,DATA, etc) were loaded
successfully.* In what function msDrawMap is loaded or is required?*





*Paul:*



Thanks it is a good help (drawMap->drawLayer->drawLayerShape). But *I don’t
understand even When or Where  DATA (layer->data) provides it’s string to
DrawMap() for drawing  DATA of a LAYER? And When or Where  drawMap function
is loaded o required?*



1.- LoadMapInternal()->case LAYER: msGrowMapLayers()->initLayer()->
LoadLayer()

2.-LoadLayer()->case DATA:getString()->msValidateParameter->msLookupHashTable()
->msFree()

*3.-¿? the intermediate step or function()*

*4.- ¿? the intermediate step or function ()*

5.- drawMap->drawLayer->drawLayerShape  (Paul Ramsey)



*Note*: Assuming that all variables of Map Object, Layer Object,Class Object
(CLASS, SYMBOL, EXTENT, SHAPEPATH, NAME, TYPE,DATA,etc) were loaded
successfully. In what function msDrawMap is loaded or is required or
automatically it is activaded when LoadMapInternal is ok?



Am I ok?


Thanks

Mauricio







2009/7/21 Paul Ramsey <pramsey at cleverelephant.ca>

> Approximately this:
>
> drawMap->drawLayer->drawLayerShape
>
> p
>
> On Sun, Jul 19, 2009 at 11:50 PM, Mauricio Herrera<georazor at gmail.com>
> wrote:
> > Hello
> >
> > Really I hope you  can help me with next doubt,I appreciate your help...
> >
> > Well, I am drawing  a function map of mapserver. Because I would like to
> > know all internal structure of mapserver. However
> > I have a problem with DATA. I don't understand what function links  DATA
> > value (layer->data) with next functions:
> >
> > imageObj *msDrawMap(mapObj *map, int querymap)
> > int msShapefileOpen(shapefileObj *shpfile, char *mode, char *filename,
> int
> > log_failures)
> >
> > (LoadLayer) file mapfile.c  <----- What is the link function for DATA
> value?
> > --------->(msDrawMap) file mapdraw.c
> > (LoadLayer) file mapfile.c  <----- What is the link function for DATA
> value?
> > ---------> (msShapefileOpen) file mapshape.c
> >
> >
> > For example:
> >
> > 1.-loadLayer()-->getString() ---->linkfunction()?------->msDrawMap()
> >                                                       |
> >                                                 filename=layer->data;
> >
> > 2.-loadLayer()-->getString()
> ---->linkfunction()?------->msShapefileOpen()
> >                                                       |
> >                                                 filename=layer->data;
> >
> >
> > I know that this  imageObj *msDrawMap(mapObj *map, int querymap) function
> is
> > used for rendering the map file. Therefore this function
> > must know where the data are located ("/usr/local/geo/street")  and DATA
> > provides this information with (layer-> data) ... but where does it? = S
> I
> > can not find the function..
> >
> >
> > And I  know too that:
> >
> > loadLayer() this function contain  a (case DATA:)  and  this call the
> > functions  getString(),msValidateParameter(),msLookupHashTable() and
> > msFree()..But In what moment DATA sends or provides its value to the
> > functions msDrawMap() o msShapefileOpen? where is the link function?
> >
> >
> > I hope you understand me
> >
> > Thanks
> >
> > Mauricio
> >
> > _______________________________________________
> > mapserver-dev mailing list
> > mapserver-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapserver-dev
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20090723/0afb084d/attachment.html


More information about the mapserver-dev mailing list