[Mapserver-users] more syntax questions
Sean Gillies
sgillies at frii.com
Thu Sep 25 19:49:58 PDT 2003
On Thursday, September 25, 2003, at 07:57 PM, pkishor_98 wrote:
> well, dunno if this is the right forum or not, but since I am a member
> of only this
> forum... here goes.
>
> Why does one need to do $layerObj->queryByShape($mapObj,$shapeObj) when
> $layerObj->queryByShape($shapeObj) should suffice... after all, the
> layerObj has
> been derived from the mapObj already... or is it that there might be
> more than one
> mapObj in the same scope? Same argument applies to $layerObj-
>> queryByRect(mapObj,rectObj) and many other such methods.
>
> I am not nitpicking -- just trying to figure out intuitively how to
> put together a map
> using the syntax that mapscript offers. Let me know if there is a
> better forum for this
> kind of discussion.
>
> Thanks,
>
Puneet,
A version ago (or more?) there was no reference to the "parent" map in
a layerObj.
This required the parent mapObj to be given as an argument to layerObj
methods
that use extents/imagetype/&c.
In 4.0, object do generally have a reference to their "parent" and so
the mapObj
argument could be eliminated. It just did not get done before the 4.0
release.
I don't consider your question to be nitpicking, I think that we should
continue
to improve mapscript's API and clean up confusing issues like this one.
Speaking of which, have you read my proposal for a significant rewrite
of the
map object constructors and "child" accessor methods?
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=358
I'd like to get some more feedback on this. And if you're in Bugzilla
adding
a new feature enhancement regarding unnecessary args to methods, please
feel
free to add me to the CC:
cheers,
Sean
--
Sean Gillies
sgillies at frii dot com
http://www.frii.com/~sgillies
More information about the MapServer-users
mailing list