Dear,
I am making a theme for a map which has more then 1000 parcels..
Each parcel has its own entity .. ie. either a parcel is 1, 2, or 3....
So if the value of parcel is 1, it should display all the parcels with value
1 in color red.. in the same manner ..
if the parcel has a value of 2 then all teh parcels with value 2 should be
displayed in green color and so on parcels having value of 3 should display
all parcels in yellow..
Please help me how can i make this
if Category_ID= 1 then all parcel with value 2 should be in green and so
on...
a part of the theme code is here below
Function ThemeforMapSearch(strDataSetName)
dim objODBCQueryInfo
dim bRC
dim s,AcceptValueVar
dim objD
dim objThem
dim strgc,dblMapX1,dblMapY1,dblMapX2,dblMapY2
dim objField,objBindLayer
dim t,dblMapX,dblMapY
dim i,strLocation,bLocFound,dblX,dblY,strRefine,strRefineLayer
dim cnt,j,layercountvar
dim fs
dim strlyrs
dim thm2
dim p,datasetcountvar
On Error Resume Next
j = Session(SESN_MAPPER).layers.count
for cnt = 1 to j
'if cnt = 3 then
if cnt = 5 then
set fs = Session(SESN_MAPPER).layers(cnt)
strlyrs = fs.Name
Response.Write strlyrs
exit for
end if
next
AcceptValueVar = Trim(Request("areaidfrommappage"))
Response.write AcceptValueVar
's = Trim(Request("areaidfrommappage"))
Session(SESN_MAPPER).Layers.ClearSelection
Session(SESN_MAPPER).Layers(fs.Name).Refresh
Session(SESN_MAPPER).Layers.Remove "SearchRadius"
bResult = DeleteAllThemes("dsODBCCounties")
bResult = DeleteAllThemes("strDataSetName")
Set objD = Session(SESN_MAPPER).Datasets(strDataSetName)
bRC = CreateMapODBCQueryInfo(objODBCQueryInfo)
If bRC = True Then
objODBCQueryInfo.SqlQuery = "Select Parcel_ID from Plot_Detail where
Area_ID = "& AcceptValueVar &" and Category_ID='2'"
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
Set objBindLayer = Session(SESN_MAPPER).layers(""& strlyrs &"")
Session(SESN_MAPPER).Datasets.add miDataSetODBC,
objODBCQueryInfo,"dsODBCCounties",_
"PARCEL_ID", , objBindLayer
Set objField = Nothing
End If
Select Case strDataSetName
case "dsODBCCounties"
Set objD =
Session(SESN_MAPPER).Datasets(strDataSetName)
End Select
strgc ="PARCEL_ID"
set objThem = objD.themes.add (5,strgc)
datasetcountvar = Session(SESN_MAPPER).Datasets.Count
'p = Session(SESN_MAPPER).Datasets.Count
set thm2 = Session(SESN_MAPPER).Datasets(p).Themes(1)
ys = thm2.ThemeProperties.IndividualValueCategories.count
for cntind = 1 to ys
if thm2.ThemeProperties.IndividualValueCategories.Item(cntind).value = "1"
then
thm2.ThemeProperties.IndividualValueCategories.Item(cntind).Style.RegionColo
r = BLUE
elseif thm2.ThemeProperties.IndividualValueCategories.Item(cntind).value =
"2" then
thm2.ThemeProperties.IndividualValueCategories.Item(cntind).Style.RegionColo
r = Blue
ELSEif thm2.ThemeProperties.IndividualValueCategories.Item(cntind).value =
"3" then
thm2.ThemeProperties.IndividualValueCategories.Item(cntind).Style.RegionColo
r = Yellow
end if
next
'objThem.legend.top = 0
'objThem.legend.left = 0
'objThem.legend.visible = false
'objThem.legend.Title = "Parcels with Records"
'objThem.legend.SubTitle = "of Plots"
'thm2.ThemeProperties.IndividualValueCategories.Item(3).Style.RegionColor =
255
bResult =FindMapLocation(""& s &"",""&strlyrs&"",bLocFound,dblX,dblY,"","")
Parceltheme = True
Session(SESN_STATUS) = ""
bResult = SetMapBounds(dblMapX1,dblMapY1,dblMapX2,dblMapY2)
End Function
Please helkp me in this ..
regards
hifazat
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 8469