Opened 20 years ago

Closed 20 years ago

#968 closed defect (fixed)

CONNECTION info ignored in layer

Reported by: LVN@… Owned by: jmckenna@…
Priority: high Milestone: 4.4 release
Component: Documentation - MapServer Version: 4.3
Severity: normal Keywords:
Cc:

Description

If I define a layer with data from a CONNECTION, and also add explicit features 
using the FEATURE keyword, the CONNECTION is completely ignored.

If impossible to render both at the same time, which would be best, at least a 
warning ought to be issued about "multiple datasets defined".

Change History (4)

comment:1 by dmorissette, 20 years ago

Cc: steve.lime@… mapserver-bugs@… added
Component: MapScript-PHPMapServer C Library
Milestone: 4.4 release
Owner: changed from mapserverbugs to jmckenna@…
This doesn't relate specifically to PHP MapScript or to any specific connection
type, so I'll move the bug to the mapserver core component.

Even if you don't set an explicit connectiontype for inline features, MapServer
internaly sets the connectiontype to MS_INLINE as it parses the mapfile and
finds inline features: the way inline features are implemented, they are just
another layer type, just like shapefiles, OGR, Postgis or any other connection
type. So for the same reason that you cannot combine OGR and PostGIS connections
into the same layer, you cannot combine inline features in the same layer. 

Unfortunately given the way the mapfile parser works I don't think it would be
easy to produce an error message if the you use multiple connection types in a
layer. You could even do the following and shouldn't get a warning:

LAYER
  CONNECTIONTYPE OGR
  CONNECTIONTYPE POSTGIS
  CONNECTIONTYPE SDE
  ...
END

I think the best we can do is add a note about this in the mapfile-reference
docs under the Feature Object section. I'll reassign to Jeff to update the
mapfile-reference.xml.

Adding Steve to the CC in case he has comments.

comment:2 by dmorissette, 20 years ago

Component: MapServer C LibraryMapServer Documentation
Actually moving this to the Documentation component.

comment:3 by sdlime, 20 years ago

Actually I thought duplicate parameters in most cases do generate an error 
message. I remember adding that a while back. The parser is not smart enough 
to catch this error. I don't think it's worth spending time fixing though 
since Jeff is the first person to ever try this. Documentation is the right 
place to fix it.

Steve

comment:4 by jmckenna@…, 20 years ago

Resolution: fixed
Status: newclosed
added note about this in the FEATURE object of the mapfile-reference doc for
both the main and branch-4-2 CVS branches.
Note: See TracTickets for help on using tickets.