[mapserver-users] Road shields on Mapserver 7

Carlos Ruiz boolean10001 at yahoo.com
Fri Feb 24 08:25:24 PST 2017


Mark,
Any layer class that has no NAME won't be displayed in the legend.
Cheers



      From: Mark Volz <MarkVolz at co.lyon.mn.us>
 To: "Lime, Steve D (MNIT)" <Steve.Lime at state.mn.us>; "bfraser at GeoAnalytic.com" <bfraser at GeoAnalytic.com>; "mapserver-users at lists.osgeo.org" <mapserver-users at lists.osgeo.org> 
 Sent: Friday, February 24, 2017 10:07 AM
 Subject: Re: [mapserver-users] Road shields on Mapserver 7
   
#yiv7409287684 #yiv7409287684 -- _filtered #yiv7409287684 {panose-1:2 4 5 3 5 4 6 3 2 4;} _filtered #yiv7409287684 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;} _filtered #yiv7409287684 {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;}#yiv7409287684 #yiv7409287684 p.yiv7409287684MsoNormal, #yiv7409287684 li.yiv7409287684MsoNormal, #yiv7409287684 div.yiv7409287684MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:11.0pt;}#yiv7409287684 a:link, #yiv7409287684 span.yiv7409287684MsoHyperlink {color:#0563C1;text-decoration:underline;}#yiv7409287684 a:visited, #yiv7409287684 span.yiv7409287684MsoHyperlinkFollowed {color:#954F72;text-decoration:underline;}#yiv7409287684 p.yiv7409287684MsoListParagraph, #yiv7409287684 li.yiv7409287684MsoListParagraph, #yiv7409287684 div.yiv7409287684MsoListParagraph {margin-top:0in;margin-right:0in;margin-bottom:0in;margin-left:.5in;margin-bottom:.0001pt;font-size:11.0pt;}#yiv7409287684 p.yiv7409287684msonormal0, #yiv7409287684 li.yiv7409287684msonormal0, #yiv7409287684 div.yiv7409287684msonormal0 {margin-right:0in;margin-left:0in;font-size:12.0pt;}#yiv7409287684 span.yiv7409287684EmailStyle18 {color:windowtext;}#yiv7409287684 span.yiv7409287684EmailStyle19 {color:#1F497D;}#yiv7409287684 span.yiv7409287684EmailStyle20 {color:#1F497D;}#yiv7409287684 span.yiv7409287684EmailStyle21 {color:#1F497D;}#yiv7409287684 span.yiv7409287684EmailStyle22 {color:#1F497D;}#yiv7409287684 .yiv7409287684MsoChpDefault {font-size:10.0pt;} _filtered #yiv7409287684 {margin:1.0in 1.0in 1.0in 1.0in;}#yiv7409287684 div.yiv7409287684WordSection1 {}#yiv7409287684 _filtered #yiv7409287684 {} _filtered #yiv7409287684 {} _filtered #yiv7409287684 {} _filtered #yiv7409287684 {} _filtered #yiv7409287684 {} _filtered #yiv7409287684 {} _filtered #yiv7409287684 {} _filtered #yiv7409287684 {} _filtered #yiv7409287684 {} _filtered #yiv7409287684 {}#yiv7409287684 ol {margin-bottom:0in;}#yiv7409287684 ul {margin-bottom:0in;}#yiv7409287684 Hello,    Thank you everyone for your help.  I was able to get road shields to display.  I do have a couple follow up questions:    First, In the legend, the shield covers up the US Highway line.  Is there a way to remove the shield from the legend, or make it the shield smaller on the legend than it is on the map?    Second, I would like the roads to be labeled several times alternating between the street name and road shield.  For example, the road shield  should be placed at positions 0, 500, 1000 and the road name should be placed at positions 250, 750, 1250.  I know that I could use REPEATDISTANCE to repeat the labels every 500 pixels, but is there something similar to INITIALGAP that will place the road name at an 250 pixel offset along the line?    I should mention that I was able to cheat by text every 250 pixels, and the shield every 500 pixels.  This works because the text does not draw at positions 0, 500, 1000 because of the label conflict with the road shield, however I was wondering if there is a cleaner way to alternate labels between the street name and road shield.           Sincerely, Mark Volz,     From: Lime, Steve D (MNIT) [mailto:Steve.Lime at state.mn.us]
Sent: Thursday, February 23, 2017 1:57 PM
To: Mark Volz <MarkVolz at co.lyon.mn.us>; bfraser at GeoAnalytic.com; mapserver-users at lists.osgeo.org
Subject: RE: [mapserver-users] Road shields on Mapserver 7    You certainly can have STYLEs inside labels. I use this to do shields on county roads:      CLASS     NAME 'County Road'     STYLE       COLOR 255 255 255       WIDTH 1 MAXWIDTH 1.5 MINWIDTH .75       OUTLINECOLOR 200 200 200       OUTLINEWIDTH 1     END     LABEL       STYLE # shield         SYMBOL 'county_road'         COLOR 255 255 255         OUTLINECOLOR 146 146 146         SIZE 13 MINSIZE 13 MAXSIZE 13         WIDTH .5 MINWIDTH .5 MAXWIDTH .5       END       PRIORITY 1       TYPE TRUETYPE       FONT 'myriad_condensed_web'       SIZE 5 MINSIZE 5 MAXSIZE 5       COLOR 146 146 146       MINDISTANCE 150       ANTIALIAS TRUE       PARTIALS FALSE       MINFEATURESIZE 20     END   END    Where county_road is referencing a true type font glyph. I’m actually doing some other conversions to remove dependency on ANNOTATION layers and haven’t run into any problems yet. Perhaps the problem isn’t with the style placement in the label but rather the contents of the style. You’d get a parse error otherwise.    Steve       From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org]On Behalf Of Mark Volz
Sent: Thursday, February 23, 2017 1:48 PM
To: bfraser at GeoAnalytic.com; mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Road shields on Mapserver 7    Brent,    I think your right.   I was under the impression that STYLE could be within a LABEL object because since Mapserver 6.2 we could have multiple labels per class.     Anyways, how can I add road shields in Mapserver 7?  Apparently annotation layers have been removed.    Thanks!    Sincerely, Mark Volz, GISP    From: Brent Fraser [mailto:bfraser at GeoAnalytic.com]
Sent: Thursday, February 23, 2017 1:39 PM
To: mapserver-users at lists.osgeo.org; Mark Volz <MarkVolz at co.lyon.mn.us>
Subject: RE: [mapserver-users] Road shields on Mapserver 7    I don't think you can put a STYLE inside a LABEL.  You could put it after the LABEL...       From: "Mark Volz" <MarkVolz at co.lyon.mn.us>
Sent: Thursday, February 23, 2017 12:32 PM
To: "bfraser at GeoAnalytic.com" <bfraser at GeoAnalytic.com>, "mapserver-users at lists.osgeo.org" <mapserver-users at lists.osgeo.org>
Subject: RE: [mapserver-users] Road shields on Mapserver 7   Brent,   I am using Mapserver 7.0.4.   Sincerely, Mark Volz, GISP   From: Brent Fraser [mailto:bfraser at GeoAnalytic.com]
Sent: Thursday, February 23, 2017 12:17 PM
To: mapserver-users at lists.osgeo.org; Mark Volz <MarkVolz at co.lyon.mn.us>
Subject: re: [mapserver-users] Road shields on Mapserver 7   version of Mapserver?       From: "Mark Volz" <MarkVolz at co.lyon.mn.us>
Sent: Thursday, February 23, 2017 10:50 AM
To: "mapserver-users at lists.osgeo.org" <mapserver-users at lists.osgeo.org>
Subject: [mapserver-users] Road shields on Mapserver 7   Hello,   I am having trouble adding road shields to my map.  The label (and for that matter the entire class) quits drawing as soon as I uncomment the STYLE block under label.  Please let me know What I can do to add road shields to my roads layer.   CLASS NAME "U.S. Highway" EXPRESSION "A10" STYLE WIDTH 5 COLOR 0 0 0 END #STYLE STYLE WIDTH 3                                 COLOR 227 159 2                 END #STYLE                 LABEL TEXT '[ROADNUM]'                                 SIZE 10 #for AGG                                 FONT vera_sans  #for AGG                                 MINFEATURESIZE 25                                 MINDISTANCE 200 #STYLE   ###  Mapserver quits drawing this layer as soon as I uncomment this block                                                 #SYMBOL './symbols/USHWY.png'                                 #END STYLE                 END #label                                          END #class   P.S.  Eventually I will want to display both the road number shield and the road name as well.   Thank You Sincerely, Mark Volz, GISP   
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20170224/b4ffabcf/attachment-0001.html>


More information about the mapserver-users mailing list