Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Layer Label

ok...

class StyleToggle{
	Style noLabels;
	Style wtihLabels;
	ILayer layer;

	StyleToggle( ILayer layer, Style noLables, Style withLabels ){

		this.noLabels = noLables;
		this.withLabels = withLabels;
		this.layer = layer;
	}

	void toggle( ){
		IStyleBlackboard bb = layer.getStyleBlackboard();
		if( bb.get( SLDContent.ID ) == withLabels ){
			bb.put( SLDContent.ID, noLabels );
		}else{
			bb.put( SLDContent.ID, withLabels );
		}
	}
	
}

This class will toggle between the two provided styles. Your plugin will have to depend on net.refractions.udig.style.sld for SLDContent to be resolved.

You can use StyleBuilder and StyleFactory to create the styles. Or you can parse the style the user created and remove the TextSymbolizers. For and example on parsing styles look at the DuplicatingStyleVisitor class in GeoTools.

Good luck,

Jesse



On Aug 8, 2007, at 12:38 AM, Andy Cox wrote:

Jesse,



I had a look and this is all very new to me and I’m not sure there is enough info on the page to work out what I need to do. I would like to do 2 things:



Programmatically turn off a layers labels
Thematically render a polygon layer based on it’s attributes e.g. if a field value=”y” colour code red, if it = “n” colour code green and then colour code all other polygons grey.


Do you have any sample code to help with these. Any pointers would be great.



Thanks

Andy



From: udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx [mailto:udig-devel- bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of Jesse Eichar
Sent: 07 August 2007 17:44
To: User-friendly Desktop Internet GIS
Subject: Re: [udig-devel] Layer Label



That's right. Hopefully there is enought information on that page I sent you if not give us a shout.



Jesse



On Aug 7, 2007, at 9:07 AM, Andy Cox wrote:




Jesse,

Yes I meant the labels rendered on the layer under the style editor which you access by right clicking the layer. I presume I still need to use the blackboard ?

Thanks
Andy

From: udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx [mailto:udig-devel- bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of Jesse Eichar
Sent: 07 August 2007 16:47
To: User-friendly Desktop Internet GIS
Subject: Re: [udig-devel] Layer Label

I'm not sure what you refer to as a Layer Label. I'm guessing you mean the labels rendered on a layer? If so then you have to interact with the layer's style blackboard.

Some documentation is here: http://udig.refractions.net/confluence/ display/DEV/3+Style

Good luck,

Jesse

On Aug 7, 2007, at 7:32 AM, Andrew Cox wrote:





Hello,

I have created a new new extension viewsAction and I want to be able to programatically switch a layer label off, rather than having to use the style editor. Please can anyone help?

Thanks
Andy

Andy Cox ivyavenue@xxxxxxxxxxx



Email straight to your blog, upload jokes, photos and more. Windows Live Spaces, it's FREE!

_______________________________________________

User-friendly Desktop Internet GIS (uDig)

http://udig.refractions.net

http://lists.refractions.net/mailman/listinfo/udig-devel

_______________________________________________

User-friendly Desktop Internet GIS (uDig)

http://udig.refractions.net

http://lists.refractions.net/mailman/listinfo/udig-devel



_______________________________________________
User-friendly Desktop Internet GIS (uDig)
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=WINDOWS-1252

<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Sounds good.  I just quickly whipped up the example.  Glad you are meeting with some success.<div><br class="webkit-block-placeholder"></div><div>Jesse</div><div><br><div><div>On Aug 9, 2007, at 6:20 AM, Andy Cox wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> <div class="Section1"><p class="MsoNormal"><font size="2" color="blue" face="Verdana"><span style="font-size: 10.0pt;font-family:Verdana;color:blue">Jesse,<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" color="blue" face="Verdana"><span style="font-size: 10.0pt;font-family:Verdana;color:blue"><o:p> </o:p></span></font></p><p class="MsoNormal"><font size="2" color="blue" face="Verdana"><span style="font-size: 10.0pt;font-family:Verdana;color:blue">Thanks for the mail. I have been experimenting with your code and got it to work with just some simple symbology. <o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" color="blue" face="Verdana"><span style="font-size: 10.0pt;font-family:Verdana;color:blue"><o:p> </o:p></span></font></p><p class="MsoNormal"><font size="2" color="blue" face="Verdana"><span style="font-size: 10.0pt;font-family:Verdana;color:blue"><o:p> </o:p></span></font></p><p class="MsoNormal"><font size="2" color="blue" face="Verdana"><span style="font-size: 10.0pt;font-family:Verdana;color:blue">I had to change the line </span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;">if( bb.get( SLDContent.ID ) == withLabels ){ To<b><span style="font-weight:bold"> </span></b>if (bb.get(SLDContent.<i><span style="font-style:italic">ID</span></i>).equals(withLabels)){</span></font><font size="2" color="blue" face="Verdana"><span style="font-size:10.0pt;font-family:Verdana; color:blue"><o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" color="blue" face="Verdana"><span style="font-size: 10.0pt;font-family:Verdana;color:blue"><o:p> </o:p></span></font></p><p class="MsoNormal"><font size="2" color="blue" face="Verdana"><span style="font-size: 10.0pt;font-family:Verdana;color:blue">And add this <o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" color="blue" face="Verdana"><span style="font-size: 10.0pt;font-family:Verdana;color:blue"><o:p> </o:p></span></font></p><p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:black;background:silver">MapContext</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:black"> context = </span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:#7F0055;font-weight:bold">new</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:black"> DefaultMapContext();                 </span></font><font size="2" face="Courier New"><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;"><o:p></o:p></span></font></p><p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:black">                                                      </span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></font></p><p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:black">StyleBuilder sb = </span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:#7F0055;font-weight:bold">new</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:black"> StyleBuilder();</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></font></p><p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:black">                                        </span></font><font size="2" face="Courier New"><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;"><o:p></o:p></span></font></p><p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:black">PolygonSymbolizer sym = sb.createPolygonSymbolizer(Color.</span></font><i><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;color:#0000C0;font-style:italic">YELLOW</span></font></i><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family: &quot;Courier New&quot;;color:black">, Color.</span></font><i><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:#0000C0;font-style:italic">BLACK</span></font></i><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:black">,1);</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></font></p><p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:black">                                    </span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></font></p><p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:black">Style noLabels = sb.createStyle(sym);</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></font></p><p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:black">                                    </span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></font></p><p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:black">PolygonSymbolizer sym2 = sb.createPolygonSymbolizer(Color.</span></font><i><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;;color:#0000C0;font-style:italic">BLACK</span></font></i><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family: &quot;Courier New&quot;;color:black">, Color.</span></font><i><font size="2" color="#0000c0" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:#0000C0;font-style:italic">BLACK</span></font></i><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:black">,1);</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></font></p><p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:black">                                    </span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></font></p><p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:black">Style withLabels = sb.createStyle(sym2);</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></font></p><p class="MsoNormal" style="text-autospace:none"><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p> </o:p></span></font></p><p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:black">StyleToggle styleToggle = </span></font><b><font size="2" color="#7f0055" face="Courier New"><span style="font-size:10.0pt;font-family: &quot;Courier New&quot;;color:#7F0055;font-weight:bold">new</span></font></b><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family: &quot;Courier New&quot;;color:black"> StyleToggle(<span style="background:silver">layer</span>, noLabels, withLabels);</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></font></p><p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:black">styleToggle.toggle();</span></font><font size="2" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;"><o:p></o:p></span></font></p><p class="MsoNormal" style="text-autospace:none"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;; color:black">                                  </span></font><font size="2" face="Courier New"><span style="font-size:10.0pt; font-family:&quot;Courier New&quot;"><o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black;background:silver">layer</span></font><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family: &quot;Courier New&quot;;color:black">.getMap().getRenderManager().refresh(<span style="background:silver">layer</span>, context.getAreaOfInterest());<o:p></o:p></span></font></p><p class="MsoNormal"><font size="2" color="black" face="Courier New"><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;color:black"><o:p> </o:p></span></font></p><p class="MsoNormal"><font size="2" color="blue" face="Verdana"><span style="font-size: 10.0pt;font-family:Verdana;color:blue">Thanks<br> Andy</span></font><font size="2" color="blue" face="Verdana"><span style="font-size: 10.0pt;font-family:Verdana;color:blue"><o:p></o:p></span></font></p> <div> <div class="MsoNormal" align="center" style="text-align:center"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"> <hr size="2" width="100%" align="center" tabindex="-1"> </span></font></div><p class="MsoNormal"><b><font size="2" face="Tahoma"><span lang="EN-US" style="font-size:10.0pt;font-family:Tahoma;font-weight:bold">From:</span></font></b><font size="2" face="Tahoma"><span lang="EN-US" style="font-size:10.0pt;font-family:Tahoma"> udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx [<a href="mailto:udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx";>mailto:udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx</a>] <b><span style="font-weight: bold">On Behalf Of </span></b>Jesse Eichar<br> <b><span style="font-weight:bold">Sent:</span></b> 08 August 2007 16:59<br> <b><span style="font-weight:bold">To:</span></b> User-friendly Desktop Internet GIS<br> <b><span style="font-weight:bold">Subject:</span></b> Re: [udig-devel] Layer Label</span></font><span lang="EN-US"><o:p></o:p></span></p> </div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt"><o:p> </o:p></span></font></p><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt">ok...  <o:p></o:p></span></font></p> <div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt"><o:p> </o:p></span></font></p> </div> <div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt">class StyleToggle{<o:p></o:p></span></font></p> </div> <div> <div><p class="MsoNormal"><span class="apple-tab-span"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">            </span></font></span>Style noLabels;<o:p></o:p></p> </div> <div> <div><p class="MsoNormal"><span class="apple-tab-span"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">            </span></font></span>Style wtihLabels;<o:p></o:p></p> </div> <div><p class="MsoNormal"><span class="apple-tab-span"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">            </span></font></span>ILayer layer;<o:p></o:p></p> </div> <div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt"><o:p> </o:p></span></font></p> </div> <div><p class="MsoNormal"><span class="apple-tab-span"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">            </span></font></span>StyleToggle( ILayer layer, Style noLables, Style withLabels ){<o:p></o:p></p> </div> <div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt"><o:p> </o:p></span></font></p> </div> <div><p class="MsoNormal"><span class="apple-tab-span"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">                        </span></font></span>this.noLabels = noLables;<o:p></o:p></p> </div> <div><p class="MsoNormal"><span class="apple-tab-span"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">                        </span></font></span>this.withLabels = withLabels;<o:p></o:p></p> </div> <div><p class="MsoNormal"><span class="apple-tab-span"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">                        </span></font></span>this.layer = layer;<o:p></o:p></p> </div> <div><p class="MsoNormal"><span class="apple-tab-span"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">            </span></font></span>}<o:p></o:p></p> </div> <div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt"><o:p> </o:p></span></font></p> </div> <div><p class="MsoNormal"><span class="apple-tab-span"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">            </span></font></span>void toggle( ){<o:p></o:p></p> </div> <div><p class="MsoNormal"><span class="apple-tab-span"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">                        </span></font></span>IStyleBlackboard bb = layer.getStyleBlackboard();<o:p></o:p></p> </div> <div><p class="MsoNormal"><span class="apple-tab-span"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">                        </span></font></span>if( bb.get( SLDContent.ID ) == withLabels ){<o:p></o:p></p> </div> <div><p class="MsoNormal"><span class="apple-tab-span"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">                                    </span></font></span>bb.put( SLDContent.ID, noLabels );<o:p></o:p></p> </div> <div><p class="MsoNormal"><span class="apple-tab-span"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">                        </span></font></span>}else{<o:p></o:p></p> </div> <div><p class="MsoNormal"><span class="apple-tab-span"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">                                    </span></font></span>bb.put( SLDContent.ID, withLabels );<o:p></o:p></p> </div> <div><p class="MsoNormal"><span class="apple-tab-span"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">                        </span></font></span>}<o:p></o:p></p> </div> <div><p class="MsoNormal"><span class="apple-tab-span"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">            </span></font></span>}<o:p></o:p></p> </div><p class="MsoNormal"><span class="apple-tab-span"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">            </span></font></span><o:p></o:p></p> </div> </div> <div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt">}<o:p></o:p></span></font></p> </div> <div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt"><o:p> </o:p></span></font></p> </div> <div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt">This class will toggle between the two provided styles.  Your plugin will have to depend on net.refractions.udig.style.sld for SLDContent to be resolved.<o:p></o:p></span></font></p> </div> <div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt"><o:p> </o:p></span></font></p> </div> <div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt">You can use StyleBuilder and StyleFactory to create the styles.  Or you can parse the style the user created and remove the TextSymbolizers.  For and example on parsing styles look at the DuplicatingStyleVisitor class in GeoTools.<o:p></o:p></span></font></p> </div> <div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt"><o:p> </o:p></span></font></p> </div> <div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt">Good luck,<o:p></o:p></span></font></p> </div> <div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt"><o:p> </o:p></span></font></p> </div> <div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt">Jesse<o:p></o:p></span></font></p> </div> <div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt"><o:p> </o:p></span></font></p> </div> <div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt"><o:p> </o:p></span></font></p> </div> <div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt"><o:p> </o:p></span></font></p> <div> <div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt">On Aug 8, 2007, at 12:38 AM, Andy Cox wrote:<o:p></o:p></span></font></p> </div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt"><br> <br> <o:p></o:p></span></font></p> <div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="blue" face="Verdana"><span style="font-size:10.0pt;font-family:Verdana; color:blue"><u1:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName">Jesse,<u1:p></u1:p></u1:smarttagtype></span></font><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="blue" face="Verdana"><span style="font-size:10.0pt;font-family:Verdana; color:blue"><u1:p> </u1:p></span></font><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="blue" face="Verdana"><span style="font-size:10.0pt;font-family:Verdana; color:blue">I had a look and this is all very new to me and I’m not sure there is enough info on the page to work out what I need to do. I would like to do 2 things:<u1:p></u1:p></span></font><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="blue" face="Verdana"><span style="font-size:10.0pt;font-family:Verdana; color:blue"><u1:p> </u1:p></span></font><o:p></o:p></p> <ol start="1" type="1"> <li class="MsoNormal" style="color:blue;mso-margin-top-alt:auto;mso-margin-bottom-alt:     auto;mso-list:l0 level1 lfo1"><font size="2" color="blue" face="Verdana"><span style="font-size:10.0pt;font-family:Verdana">Programmatically turn off a     layers labels<u1:p></u1:p></span></font><o:p></o:p></li> <li class="MsoNormal" style="color:blue;mso-margin-top-alt:auto;mso-margin-bottom-alt:     auto;mso-list:l0 level1 lfo1"><font size="2" color="blue" face="Verdana"><span style="font-size:10.0pt;font-family:Verdana">Thematically render a polygon     layer based on it’s attributes e.g. if a field value=”y”     colour code red, if it = “n” colour code green and then colour     code all other polygons grey.<u1:p></u1:p></span></font><o:p></o:p></li> </ol><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="blue" face="Verdana"><span style="font-size:10.0pt;font-family:Verdana; color:blue"><u1:p> </u1:p></span></font><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="blue" face="Verdana"><span style="font-size:10.0pt;font-family:Verdana; color:blue">Do you have any sample code to help with these. Any pointers would be great.<u1:p></u1:p></span></font><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="blue" face="Verdana"><span style="font-size:10.0pt;font-family:Verdana; color:blue"><u1:p> </u1:p></span></font><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="blue" face="Verdana"><span style="font-size:10.0pt;font-family:Verdana; color:blue">Thanks<u1:p></u1:p></span></font><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="blue" face="Verdana"><span style="font-size:10.0pt;font-family:Verdana; color:blue">Andy<u1:p></u1:p></span></font><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="blue" face="Verdana"><span style="font-size:10.0pt;font-family:Verdana; color:blue"><u1:p> </u1:p></span></font><o:p></o:p></p> <div> <div class="MsoNormal" align="center" style="text-align:center"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"> <hr size="2" width="100%" align="center" tabindex="-1"> </span></font></div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><font size="2" face="Tahoma"><span lang="EN-US" style="font-size:10.0pt;font-family:Tahoma; font-weight:bold">From:</span></font></b><font size="2" face="Tahoma"><span lang="EN-US" style="font-size:10.0pt;font-family:Tahoma"> <a href="mailto:udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx";>udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx</a> [<a href="mailto:udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx";>mailto:udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx</a>] <b><span style="font-weight:bold">On Behalf Of </span></b>Jesse Eichar<br> <b><span style="font-weight:bold">Sent:</span></b> 07 August 2007 17:44<br> <b><span style="font-weight:bold">To:</span></b> User-friendly Desktop Internet GIS<br> <b><span style="font-weight:bold">Subject:</span></b> Re: [udig-devel] Layer Label</span></font><o:p></o:p></p> </div> <u1:p></u1:p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u1:p> </u1:p><o:p></o:p></span></font></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">That's right. Hopefully there is enought information on that page I sent you if not give us a shout.<u1:p></u1:p><o:p></o:p></span></font></p> <div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u1:p> </u1:p><o:p></o:p></span></font></p> </div> <div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Jesse<u1:p></u1:p><o:p></o:p></span></font></p> </div> <div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u1:p> </u1:p><o:p></o:p></span></font></p> <div> <div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">On Aug 7, 2007, at 9:07 AM, <st1:personname u2:st="on">Andy Cox</st1:personname> wrote:<u1:p></u1:p><o:p></o:p></span></font></p> </div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><br> <br> <br> <o:p></o:p></span></font></p> <u1:p></u1:p> <div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial; color:navy">Jesse,<u3:p></u3:p></span></font><u1:p></u1:p><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial; color:navy"><u3:p></u3:p>Yes I meant the labels rendered on the layer under the style editor which you access by right clicking the layer. I presume I still need to use the blackboard ?<u3:p></u3:p></span></font><u1:p></u1:p><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial; color:navy"><u3:p></u3:p>Thanks<br> Andy<u3:p></u3:p></span></font><u1:p></u1:p><o:p></o:p></p> <font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt; font-family:&quot;Times New Roman&quot;"><u3:p></u3:p></span></font> <div> <div class="MsoNormal" align="center" style="text-align:center"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"> <hr size="2" width="100%" align="center" tabindex="-1"> </span></font></div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><font size="2" face="Tahoma"><span lang="EN-US" style="font-size:10.0pt;font-family:Tahoma; font-weight:bold">From:</span></font></b><font size="2" face="Tahoma"><span lang="EN-US" style="font-size:10.0pt;font-family:Tahoma"> <a href="mailto:udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx";>udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx</a> [<a href="mailto:udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx";>mailto:udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx</a>] <b><span style="font-weight:bold">On Behalf Of </span></b>Jesse Eichar<br> <b><span style="font-weight:bold">Sent:</span></b> 07 August 2007 16:47<br> <b><span style="font-weight:bold">To:</span></b> User-friendly Desktop Internet GIS<br> <b><span style="font-weight:bold">Subject:</span></b> Re: [udig-devel] Layer Label</span></font><u1:p></u1:p><o:p></o:p></p> </div> <u3:p></u3:p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u3:p></u3:p>I'm not sure what you refer to as a Layer Label. I'm guessing you mean the labels rendered on a layer? If so then you have to interact with the layer's style blackboard. <u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></p> <div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u3:p></u3:p>Some documentation is here: <a href="http://udig.refractions.net/confluence/display/DEV/3+Style";>http://udig.refractions.net/confluence/display/DEV/3+Style</a><u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></p> </div> <div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u3:p></u3:p>Good luck,<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></p> </div> <div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u3:p></u3:p>Jesse<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></p> </div> <div> <div> <div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u3:p></u3:p>On Aug 7, 2007, at 7:32 AM, Andrew Cox wrote:<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></p> </div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><br> <br> <br> <br> <o:p></o:p></span></font></p> <u1:p></u1:p><p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u3:p></u3:p>Hello,<br> <br> I have created a new new extension viewsAction and I want to be able to programatically switch a layer label off, rather than having to use the style editor. Please can anyone help?<br> <br> Thanks<br> Andy<br> <br> <st1:personname u2:st="on">Andy Cox</st1:personname> <a href="mailto:ivyavenue@xxxxxxxxxxx";>ivyavenue@xxxxxxxxxxx</a><br> <br> <br> <br> <o:p></o:p></span></font></p> <u1:p></u1:p> <div class="MsoNormal" align="center" style="text-align:center"><u3:p></u3:p><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> <hr size="2" width="100%" align="center"> </span></font></div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Email straight to your blog, upload jokes, photos and more. <a href="http://specials.uk.msn.com/spaces/default.aspx%20"; target="_new">Windows Live Spaces, it's FREE!</a><u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></p> <div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">_______________________________________________<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></p> </div> <div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">User-friendly Desktop Internet GIS (uDig)<u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></p> </div> <div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><a href="http://udig.refractions.net";>http://udig.refractions.net</a><u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></p> </div> <div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><a href="http://lists.refractions.net/mailman/listinfo/udig-devel";>http://lists.refractions.net/mailman/listinfo/udig-devel</a><u3:p></u3:p><u1:p></u1:p><o:p></o:p></span></font></p> </div> </div> </div> </div> <div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u3:p></u3:p>_______________________________________________<u1:p></u1:p><o:p></o:p></span></font></p> </div> <div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">User-friendly Desktop Internet GIS (uDig)<u1:p></u1:p><o:p></o:p></span></font></p> </div> <div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><a href="http://udig.refractions.net";>http://udig.refractions.net</a><u1:p></u1:p><o:p></o:p></span></font></p> </div> <div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><a href="http://lists.refractions.net/mailman/listinfo/udig-devel";>http://lists.refractions.net/mailman/listinfo/udig-devel</a><u1:p></u1:p><o:p></o:p></span></font></p> </div> </div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><u1:p> </u1:p><o:p></o:p></span></font></p> </div> </div> <div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt">_______________________________________________<o:p></o:p></span></font></p> </div> <div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt">User-friendly Desktop Internet GIS (uDig)<o:p></o:p></span></font></p> </div> <div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt"><a href="http://udig.refractions.net";>http://udig.refractions.net</a><o:p></o:p></span></font></p> </div> <div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt"><a href="http://lists.refractions.net/mailman/listinfo/udig-devel";>http://lists.refractions.net/mailman/listinfo/udig-devel</a><o:p></o:p></span></font></p> </div> </div><p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size: 12.0pt"><o:p> </o:p></span></font></p> </div> </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">User-friendly Desktop Internet GIS (uDig)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="http://udig.refractions.net";>http://udig.refractions.net</a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="http://lists.refractions.net/mailman/listinfo/udig-devel";>http://lists.refractions.net/mailman/listinfo/udig-devel</a></div> </blockquote></div><br></div></body></html>
--Apple-Mail-2-64953344--


Back to the top