Dear All, How can i change the color of legends in mapxtreme asp code.
if category 1 is not empty its should be red and if category 2 is not empty it should be green and if category 3 is not empty then it should be blue. but in my case its fixed .. ie. if value of category 1 is empty then for category 2 its displaying red .. which is wrong, it should display green as category 2 is displayed in green and not red. can anyone help me.. Thanks in Advance and Happy New Year and Happy Christmas to all Bets Regards Sayed below is the code where I m showing the theme Set objDS = Session(SESN_MAPPER).DataSets(strDataSetName) nThemeType = 5 nNumFields = Request.Form("ParcelID") CategoryID = Request.Form("CategoryID") j = Session(SESN_MAPPER).layers.count for cnt = 1 to j if cnt = 5 then set fs = Session(SESN_MAPPER).layers(cnt) strlyrs = fs.Name exit for end if next AcceptValueVar = Trim(Request.Form("areamapid")) Session(SESN_MAPPER).Layers.ClearSelection Session(SESN_MAPPER).Layers(fs.Name).Refresh bResult1 = DeleteAllThemes("dsODBCCounties") bResult = DeleteAllThemes("strDataSetName") bRC = CreateMapODBCQueryInfo(objODBCQueryInfo) if CategoryID <> 0 then objODBCQueryInfo.SqlQuery = "Select * from Plot_Detail where Area_ID = "& AcceptValueVar &" and Category_ID='"&CategoryID&"'"'"& s &"" else objODBCQueryInfo.SqlQuery = "Select * from Plot_Detail where Area_ID = "& AcceptValueVar &""'"& s &"" end if objODBCQueryInfo.DataSource = "" & Application("dsn") & ";" ' name of odbc datasource objODBCQueryInfo.ConnectString = "uid=" & Application("uid") & ";pwd=" & Application("pwd") &";" 'can be left blank, or can include user= or pwd= or DLG= 'bRC = CreateMapFields(objField) 'objField.add "PARCEL_ID", "PARCEL_ID" , 4, 0 objField.add "Category_ID", "Category_ID" , 0, 1 objField.add "CategoryName", "CategoryName" , 0, 1 objField.add "Category", "Category" , 0, 1 Set objBindLayer = Session(SESN_MAPPER).layers(""& strlyrs &"") Session(SESN_MAPPER).Datasets.add miDataSetODBC, objODBCQueryInfo,"dsODBCCounties",_ "Parcel_ID", , objBindLayer If bRC = True Then Set objDS = Session(SESN_MAPPER).DataSets(strDataSetName) End If bRC = CreateMapFields(objFields) strgc = "CategoryName" set objTheme = objDS.themes.add (nThemeType, strgc) Set rc = objTheme.ThemeProperties.IndividualValueCategories(1) objTheme.legend.top = 2 objTheme.legend.left = 2 objTheme.legend.visible = true objTheme.legend.Title = "Plot Records " objTheme.legend.SubTitle = "by Plot Categories" --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 9829