Uniquerender in AE-a simple example of unique value rendering (VB. NET source code)

Source: Internet
Author: User

 Go directly to the source code for your reference.

''' <Summary>
''' Is rendered with different symbrs based on the value of a field.
''' </Summary>
''' <Param name = "pgeofeaturelayer"> rendered layer </param>
''' <Remarks> </remarks>
Private sub uniquerender (byval pgeofeaturelayer as igeofeaturelayer)
Dim puniquerender as iuniquevaluerenderer = new uniquevaluerenderer
Dim pcolor as icolor
Dim pcmsymbol as icharactermarkersymbol
Dim pfont as stdole. ifontdisp = new stdole. stdfont
Pfont. Name = "ESRI default marker"
Pcolor = new rgbcolor
Pcolor. RGB = RGB (56,168, 0)
Pcmsymbol = new charactermarkersymbol
Pcmsymbol. font = pfont
Pcmsymbol. characterindex = 33
Pcmsymbol. Color = pcolor
Pcmsymbol. size = 10
Puniquerender. fieldcount = 1
Puniquerender. Field (0) = g_fieldtype
Puniquerender. defaultsymbol = pcmsymbol
Puniquerender. usedefasymsymbol = true

Pcolor = new rgbcolor
Pcolor. RGB = RGB (255,255, 0)
Pcmsymbol = new charactermarkersymbol
Pcmsymbol. font = pfont
Pcmsymbol. characterindex = 80
Pcmsymbol. Color = pcolor
Pcmsymbol. size = 20
''Added different types. The featureclass must have the corresponding fields.
Puniquerender. addvalue (2, "type1", pcmsymbol)

Pcolor = new rgbcolor
Pcolor. RGB = RGB (85,255, 0)
Pcmsymbol = new charactermarkersymbol
Pcmsymbol. font = pfont
Pcmsymbol. characterindex = 88
Pcmsymbol. Color = pcolor
Pcmsymbol. size = 20
Puniquerender. addvalue (3, "type2", pcmsymbol)

pgeofeaturelayer. renderer = puniquerender
pgeofeaturelayer. displayfield = "type" 'field name used for unique value rendering
end sub

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.