[UMN_MAPSERVER-USERS] ok - got zoom to work - another question

Skweda O'Bomsawin sobomsawin at KASSINI.COM
Thu Nov 25 08:48:54 EST 2004


If you are on Linux, try the QGIS application which will ease a lot your
work with shapefiles.  You can see and change information easily and look at
the properties of your shapefile (extents, etc.).

http://qgis.sourceforge.net/



Skweda O'Bomsawin


-----Message d'origine-----
De : UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] De la
part de Joseph Norris
Envoyé : 24 novembre 2004 16:38
À : MAPSERVER-USERS at LISTS.UMN.EDU
Objet : Re: [UMN_MAPSERVER-USERS] ok - got zoom to work - another question

Thanks for this information. And as always it leads to another question.
When you say add a field to your shapefile - are you referring to just the
dbf file or is there something I have to do to the shp file itself?  This
would be a general type question on adding any type data to shapefiles -
what is the process for doing this?


#Joseph Norris (Perl - what else is there?/Linux/CGI/Mysql) print @c=map chr
$_+100,(6,17,15,16,-68,-3,10,11,16,4,1,14,-68,12,1,14,8,-68,4,-3,-1,7,1,14,-
68,-26,11,15,1,12,4,-68,-22,11,14,14,5,15,-90);

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at lists.umn.edu]On
Behalf Of David Fawcett
Sent: Wednesday, November 24, 2004 11:35 AM
To: MAPSERVER-USERS at lists.umn.edu
Subject: Re: [UMN_MAPSERVER-USERS] ok - got zoom to work - another question

Joseph,

The most simple way to do this is to have a field in your shapefile
with text for each label.  (e.g. 23 teachers, 10 teachers, etc.)
Call it something like 'labeltext'.

Then in the Layer Object in the Map File for the layer that you want to
label, place a LABELITEM.

LABELITEM 'labeltext'

If you are just storing the number of teachers in a ZipCode in the
shapefile, you can concatonate a label together by using.

    TEXT ([NUM_TEACHERS] Teachers)  in your class.


David.




>>> Joseph Norris <sirronj at PACBELL.NET> 11/24/2004 1:11:55 PM >>>
Thanks Dylan,

A question:  I have found these parms labelminscale and labelmaxscale.
How
do I set the label for "23 teachers" or "10 teachers" so that - as I
understand when the user zooms into a polygon, the see this label. Does
that
have something to do with Feature object?

#Joseph Norris (Perl - what else is there?/Linux/CGI/Mysql) print
@c=map chr
$_+100,(6,17,15,16,-68,-3,10,11,16,4,1,14,-68,12,1,14,8,-68,4,-3,-1,7,1,14,-
68,-26,11,15,1,12,4,-68,-22,11,14,14,5,15,-90);

-----Original Message-----
From: Dylan Keon [mailto:keon at nacse.org]
Sent: Wednesday, November 24, 2004 10:32 AM
To: Joseph Norris
Cc: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] ok - got zoom to work - another
question

On 11/24/2004 10:13 AM, Joseph Norris wrote:

>   The lengthy <elaborate kludge> that you mention is something I
would
like
> to avoid due to the nature of the project. So that leaves me with
the
> open-ended question to all - what suggestions do any and all have
with
> regard to the last part of what I am trying to accomplish - namely -
allow
> the user to zoom into a polygon and see some representation of
what's
> there - a label of the actual number of teachers? I am opened to that
but
at
> this point in my mapserver education, I am limited in my
understanding of
> Labeling. Can a label be placed within the minscale/maxscale scenario
so
> that when you zoom in you see the label and when you zoom out it
disappears?

Yes.  Look for LABELMINSCALE and LABELMAXSCALE at
http://mapserver.gis.umn.edu/doc42/mapfile-reference.html.  Just store
the desired label as an attribute within the shapefile.  There are
also
ways to apply labels dynamically via mapscript.

--Dylan

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.784 / Virus Database: 530 - Release Date: 2004-10-27
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.784 / Virus Database: 530 - Release Date: 2004-10-27
 



More information about the mapserver-users mailing list