Proposed change to symbols.
Stephen Lime
steve.lime at dnr.state.mn.us
Thu Jul 27 14:38:21 PDT 2000
The simple solution pretty much already exists. Loop through the layers,
all have to be off to start with, and one-by-one create a legend without
any legend text (actually a " "). Do a drawLegend and save. There'd be
some slop around the legend but it'd work.
You could also create mini maps using a virtual mapfile and one layer for point,
line and polygon data. An inline feature could be used to represent the line,
center point or the polygon. Just loop over the layers and classes and
use those values to set the class values for the appropriate layer in the
virtual map, draw and save.
You can reference the resulting images at will then in resulting docs.
s.
>>> <ender at titan.lab.csuchico.edu> 07/27/00 07:24AM >>>
I think I know what Jason wants, and I want it myself as well. I'll
describe what I want it for, and Jason can confirm if it's the same thing
he's thinking of.
Say I want to create a legend similar to the one on DMSolutions page:
http://www2.dmsolutions.on.ca/gmap/gmap75.phtml
I need to be able to get the individual images used in the legend table,
so I could show the symbols as they actually are. I could write a program
to read the mapfile and spit out all of the classification images,
allowing me to hardcode each symbol with an image representing that
classification. The problem with this is that it's static. There's no
way to dynamically get just the symbol after a dynamic reclassification
using a call to mapserver.
The only solution to this problem that I can think of involves setting up
sessions and having mapserver start to log hits. I've thought of setting
this up for years now, and have never had the time or money to do it, but
that's a seperate topic...
I think that a simple sollution that just returned the image for a
specific map, layer and class would be pretty easy to write, but would
have very limited use.
-Aaron
On Thu, 27 Jul 2000, Stephen Lime wrote:
> How do you mean query? You can get at that in MapScript. I'm not sure why you'd want
> that capability in the C CGI program.
>
> Steve
>
> Stephen Lime
> Internet Applications Analyst
>
> Minnesota DNR
> 500 Lafayette Road
> St. Paul, MN 55155
> 651-297-2937
>
> >>> Jason Maestri <jmaes at riparia.net> 07/27/00 02:27AM >>>
> Hey, while we're discussing symbols... As nearly as I can tell, there is no way to query mapserver for the symbol for a specific layer/class (for use in legends, and elsewhere), is that something is possible, and if not, could it be made possible (Steve)?
>
> --Jason
>
> imap at chesapeake.net wrote:
>
> > Steve/List,
> >
> > Being one of the advocates for symbol/marker changes, here is some rationale
> > behind the changes. The current symbol files are somewhat static and if the
> > files become large, there is overhead incurred on every invocation of mapserv.
> > Also, the current scheme also does not lend itself to dynamic marker placement
> > very
> > well. (that is, using a marker NOT defined in marker.sym)
> >
> > We want to be able to use external markers from a PATH filespec to make it
> > easier
> > to maintain (no more editing the marker.sym file ;) and (2) make it more
> > programmer
> > friendly and simplifies the mapscript a bit.
> >
> > As far as functionality, it would be nice to interrogate a $class->{symbol} to
> > determine it's height/width and some sort of option to set/get control of
> > collision
> > avoidance (labelcache). (I think needed for both POINT and ANNOTATION
> > layers) And lastly, make sure to preserve the ability to examine to labelcache
> > to
> > extract the polygons of the markers and text placed on the map.
> >
> > I am all for getting rid of marker.sym 100% although it may break my current
> > applications... sometimes change is painful. Anyway to code an interim
> > solutions that works both ways? probably not, but thought I would ask anyway.
> >
> > Regards,
> >
> > Chris Stuber (mapsurfer)
> > Silicon Mapping Solutions, Inc.
> > 410.257.3187
> >
> > Stephen Lime wrote:
> > >
> > > I'd like to propose a couple of changes to the way symbols are handled. This is to make symbols easier to manage and to support some additional functionality proposed by a couple of other users. The initial change would be this:
> > >
> > > Do away with separate marker, line and shade symbol files in favor of a single symbol file. Also, allow symbol definitions in the map file.
> > >
> > > Syntax would be the same and access (i.e. symbols referenced in class objects) would be the same. These changes allow for a simpler MapScript symbol interface and additional opportunities for defining symbols on-the-fly. Begining in 3.3.011 you can already specify a GIF/PNG file (relative to the location of the map file) in a class object (i.e. SYMBOL "graphics/marker.gif") and a symbol is dynamically created. MapScript method $map->getSymbolByName("graphics/marker.gif"); will also work.
> > >
> > > Any thoughts or can I code it?
> > >
> > > Steve
>
>
More information about the MapServer-users
mailing list