This is kinda tricky, so I'll do my best with some pseudo code to explain the
logic.
Icons are constructed with a combination of Work Order Completion Status and
Claim status.
$workOrder = Work Order. Primary Key = e.g. "A123"
$workOrderCompletionStatus =
Completion Status (Key) Color (value)
Open, Unassigned (default) red
Open, Assigned yellow
Open, Partially Completed yellow
Closed, Completed green
Closed, Incomplete green
Closed, Out of Scope gray
Closed, Done by Others darkgreen
Closed, Rejected xgray
Open, Needs Follow-up yellow
Closed, Duplicate invisible
Closed, No Help Wanted invisible
$workOrderClaimStatus =
CLAIM STATUS:Color
Claimed &"Open,Unassigned":orange
Claimed & any other status or Unclaimed:Color of Completion Status above
$workOrderCoordinants = Lat/long values.
Logic/ pseudo-code:
IF($workOrderCompletionStatus[value]== "invisible") {Do not Display work order
on map.}
ELSE IF (!exists($workOrderCoordinants) || $workOrderCoordinants == "0.0000,
0.0000") {Display this work order in a cluster somewhere in the middle of New
York Harbor. That way they're not lost, and can be easily edited and fixed.}
ELSE IF ($workOrderClaimStatus == "Claimed" && $workOrderCompletionStatus ==
"Open, Unassigned") {$color = "orange"}
ELSE {$color = $workOrderCompletionStatus[value]}
$primaryWorkType[value] = Flood["Flood"], Trees["Trees"], Goods and
Services["Goods"] Other["Other"], etc. These are directly from the DB.
$placemarkStyle = $primaryWorkType_$color
$placemarkIconFileName = $placemarkStyle.png
Here is the Excel code that composes a placemark or closing tag, that
illustrates this logic:
=IF(len(D5)=0,"</Folder></Document></kml>",if(or(J5="transparent",len(G5)=0),"",
"<Placemark><name><![CDATA["&Requests!B5&"]]></name><description><![CDATA["&D5&"
<br /><strong>"&Requests!B5&": "&Requests!C5&"<br
/>"&Requests!AA5&"]]></description><styleUrl>#"&Requests!AC5&"_"&J5&"</styleUrl>
<Point><coordinates>"&M5&", "&L5&"</coordinates></Point></Placemark>"))
Original issue reported on code.google.com by v...@aarontitus.net on 7 Nov 2012 at 6:07
Original issue reported on code.google.com by
v...@aarontitus.net
on 7 Nov 2012 at 6:07