|
POST
|
Are you using symbology that is only available in the new Map Viewer? Can you see the symbology when you open it in Map Viewer Classic? The Map Viewer Class (and the Web AppBuilder) uses JavaScript 3.x, while the new Map Viewer uses JavaScript 4.x.
... View more
03-19-2024
07:07 AM
|
0
|
0
|
1141
|
|
POST
|
In the Line item template, open the Source and modify the HTML to add in this: Functioning Toilet: <span style="color:{expression/Functoilet};">{field/Func_Toile}</span>
</p> Here's an example using my data Also you can use the When function to simplify your code var Electsource = When($datapoint.Main_Sourc =="Electricity Grid", "#57A700",
$datapoint.Main_Sourc =="Generator", "#FFA500",
$datapoint.Main_Sourc =="Solar", "#FFA500",
$datapoint.Main_Sourc =="No data", "#800000",
'#000000');
var Functoilet = When($datapoint.Func_Toile =="Yes", "#57A700",
$datapoint.Func_Toile =="No", "#6E6865",
$datapoint.Func_Toile =="No data", "#6E6865",
'#000000');
return {
textColor: '',
backgroundColor: '',
separatorColor:'',
selectionColor: '',
selectionTextColor: '',
attributes: {
Electsource: Electsource,
Functoilet: Functoilet,
}
}
... View more
03-19-2024
06:49 AM
|
0
|
1
|
2556
|
|
POST
|
If you have a relationship set up between the feature layer and the relationship table, you can use that directly using FeatureSetByRelationshipName function to return the related records for a feature. For example, this layer has several related tables. This is the code to loop through the related records from the related table "DCGIS.SURDOCS" for the feature. var related = FeatureSetByRelationshipName($feature, "DCGIS.SURDOCS");
for (var rec in related) {
}
... View more
03-18-2024
02:11 PM
|
0
|
1
|
2038
|
|
POST
|
This will be fixed in ExB DE 1.14, according to the staff at the Dev Summit.
... View more
03-18-2024
08:33 AM
|
1
|
0
|
1196
|
|
POST
|
This will be fixed in ExB DE 1.14, according to the staff at the Dev Summit.
... View more
03-18-2024
08:30 AM
|
1
|
0
|
1263
|
|
POST
|
Have you done a hard refresh (Ctrl-F5) on the web app page?
... View more
03-18-2024
08:27 AM
|
0
|
0
|
1196
|
|
POST
|
There were a couple of issues. First, you were using a string ('1.0') instead of a number to check for metersize_inches. Also, you were missing some curly braces in the if statements. If I understand your logic, then this should work using the When function. When (//Meters less than or equal to 1.0 inches and installed less than or equal to 15 years ago
$feature.metersize_inches <= 1.0 && DateDiff(Now(), Date($feature.installdt), 'year') <= 15, "Small Meters installed up to 15 years ago",
//Meters greater than or equal to 1.5 inches and installed less than or equal to 10 years ago
$feature.metersize_inches >= 1.5 && DateDiff(Now(), Date($feature.installdt), 'year') <= 10, "Large Meters installed up to 10 years ago",
"None of these");
... View more
03-18-2024
07:55 AM
|
0
|
1
|
1971
|
|
POST
|
You can always add more fields to a label string. This example uses template literals. var output = `${$feature.field1} and ${$feature.field2}`
... View more
03-18-2024
07:36 AM
|
0
|
0
|
3003
|
|
POST
|
Line 19 should get the proper customer ID from the related table. What do you want to return if there's no related record?
... View more
03-18-2024
07:32 AM
|
0
|
2
|
2012
|
|
POST
|
You were returning the Console function instead of the CustomerID from the related layer. Give this code a try. I restructured it so it first checks if there's an intersection before getting the related table. // Define a Featureset (Customers) from the layer "Customers" in the $map
// that contains the attribute ['CustomerID']
var Customers = FeatureSetByName($map, "Customers", ['CustomerID']);
// Define a variable (code) to store the value we want
// Get the value by Intersecting the polygon location
// with the FeatureSet "Customers", or Customers
var code = First(Intersects($feature, Customers));
// If the current location intersects Customers,
// return the value in the field ['CustomerID'].
if (!IsEmpty(code)) return code['CustomerID'];
// If no intersect, pull customer id into related feature layer [PropertyBoundary]
var relcustid = First(FeatureSetByRelationshipName($feature.CustomerID, "Customers_PropertyBoundary"));
return relcustid["CustomerID"];
... View more
03-15-2024
09:51 PM
|
1
|
4
|
2054
|
|
POST
|
You have to use the Pow function. return 130 * Pow(27, (1/3))
... View more
03-15-2024
09:32 PM
|
2
|
0
|
1679
|
|
POST
|
The first thing you should do is check if the TaxRateCity is unincorporated. There's no need to do the expensive buffer and intersections if isn't in your jurisdiction. Next, you're buffering the feature twice. Only do that once. It looks like the feature only intersect one Zoning feature and one Zoning SP category, since you're not pushing the results into an array. If so, you can just get the First item in each intersection FeatureSet instead of looping through them. Here's my attempt at making this more efficient, also using template literals to make it easier to understand. Note, it's not tested, so it may need some tweaking. var revision_text ;
if ($feature.TaxRateCity != "unincorporated") {
revision_text = `This property is within the city of <b>${$feature.TaxRateCity}</b> and is out of our jurisdiction.<br/><br/>
Our zoning is only for the UNINCORPORATED areas of LA County.<br/><br/>
Contact city staff for zoning info.<br/><br/>
<a href='https://file.lacounty.gov/SDSInter/lac/1043535_city_webaddress.pdf'>Incorporated LA County Cities Contact List</a>`;
} else {
var featBuffer = Buffer($feature, -20, "feet");
var GeneralIntersect = First(Intersects(FeatureSetByName($map, "ZNET_Public - Zoning (Hidden from Map)"), featBuffer));
var SP_Intersect = First(Intersects(FeatureSetByName($map, "ZNET_Public - Zoning SP Category (Hidden from Map)"), featBuffer));
var zone_link = `https://library.municode.com/ca/los_angeles_county/codes/code_of_ordinances?nodeId=TIT22PLZO_${GeneralIntersect.TITLE_22}`;
var zone_area = `${Proper(GeneralIntersect.NAME)}-${GeneralIntersect.PLNG_AREA} Planning Area`
revision_text = `<a href='${zone_link}'><font color=#0066ff><b>${GeneralIntersect.Z_DESC} Zone (${GeneralIntersect.Z_CATEGORY})↗</b></font></a><br>
<span style='font-size:15px;'>Specific Zone(s): ${GeneralIntersect.Zone} <span>- ${SP_Intersect.PLAN_LEG}</span><span title='This may or may not be the same as the zone category above.
It can differ when extra numbers or letters are added to the end,
or when the property is part of a specific plan. Extra numbers
indicate a minimum lot size and letters indicate a combined
zone.'> ⓘ</span><br><br>
<span style='font-size:15px;'><b><i>Main Address:</i></b><i><br>
${$feature.SitusFullAddress}</i><br>
<b><i>AIN:</i></b><i> ${$feature.AIN}</i><br><br>
${zone_area}<br><br>
<a href='https://portal.assessor.lacounty.gov/parceldetail/${$feature.AIN}'><font color=#0066ff><i>Get Assessor Details for this Property↗</i></font></a><br>
<a href='https://rpgis.isd.lacounty.gov/Html5Viewer/index.html?viewer=GISNET_Public.GIS-NET_Public&run=UrlSearch&term=${$feature.AIN}'><font color=#0066ff><i>Go to this Property in GIS-NET↗</i></font></a><br>
<a href='https://planning.lacounty.gov/land-use-zoning/'><font color=#0066ff><i>Learn More about Zoning↗</i></font></a><br>
<a href='https://outlook.office365.com/book/RegionalPlanningVirtualOnlineAppointments@lacounty.onmicrosoft.com/'><font color=#0066ff><i>Schedule an Appointment↗</i></font></a></span>`;
}
return {
type : 'text',
text : `<span style=\"display: block; size: '20'; font-size: 16px; text-align: left; padding: 0.5rem; color: black; \">${revision_text}</span>`
}
... View more
03-15-2024
04:27 PM
|
1
|
1
|
1779
|
|
POST
|
Your problem in the first line of the When function is a wind can't be both (&&) greater than 337.5 and 22.5. You want to check if it's greater OR (||) less than those values. An easier way to write that expression is var wind = $feature.Wind_Dir;
When(
wind < 22.5, 'N',
wind < 67.5, 'NE',
wind < 112.5, 'E',
wind < 157.5, 'SE',
wind < 202.5, 'S',
wind < 247.5, 'SW',
wind < 292.5, 'W',
wind < 337.5, 'NW',
wind < 360, 'N',
'NA'
); If the function doesn't evaluate the first line as true, then it moves to the second line. For example, if the wind is 30, it fails the first check and moves on to the second. You don't need to check if is greater than 22.4 and less than 67.5 since it already verified that it's greater than 22.5.
... View more
03-15-2024
10:11 AM
|
0
|
1
|
1539
|
|
POST
|
It would be helpful to start a new discussion and give more information on what you're trying to do.
... View more
03-14-2024
10:13 AM
|
0
|
0
|
6724
|
|
POST
|
Web Viewer Classic is built with JavaScript 3.x, which doesn't support '\n' or TextFormmatting.NewLine. The new Map Viewer is built with Javascript 4.x, which does support these.
... View more
03-13-2024
09:51 AM
|
0
|
1
|
1901
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-04-2025 06:39 AM | |
| 1 | 05-01-2026 08:26 AM | |
| 1 | 04-10-2026 12:01 PM | |
| 1 | 04-13-2026 09:11 AM | |
| 1 | 10-11-2023 06:18 AM |
| Online Status |
Offline
|
| Date Last Visited |
20 hours ago
|