{ "layers": [ { "id": "2", "name": "Survey Control (Existing)", "nativeID": "2", "displayName": "Survey Controls", "description": "", "defaultVisibility": true, "featureType": "Point", "type": "DynamicFeatureLayer", "maxScale": 100, "minScale": 110000, "visible": false, "initiallyVisible": false, "showMapTips": true, "identifiable": true, "queryable": true, "searchable": true, "supportsIdentify": true, "supportsQuery": true, "canCopyFeature": true, "snappable": true, "snappingEnabled": true, "hasAttachments": true, "featureZoomFactor": null, "featureZoomScale": 2257, "featureBorderColor": null, "featureBorderWidth": null, "featureFillColor": null, "showFeatureHyperlinks": "ShowAll", "iconUri": null, "includeInLayerList": true, "includeInLegend": true, "allowSymbolization": true, "legendUrl": null, "styleName": null, "drawIndex": null, "canToggleLabels": false, "showLabels": true, "dataProvider": null, "timeZoneId": "Etc/UTC", "featureLabel": "{MonDesc} {Monument}", "featureDescription": "
Monument Number: {PDF}
Agency: {AgencyDesc}
Status: {Status} | {LastFoundUTC}

{Comments}
{Attachments}
{Nearest}

{Email}
", "featureLongDescription": "
Monument Number: {PDF}
Agency: {AgencyDesc}
{LastFoundUTC}

{Comments}
{Attachments}
{Nearest}

{Email}
", "displayField": "Monument", "primaryKeyField": "OBJECTID", "fullExtent": { "xmin": -8885753.6193403769, "ymin": 5382829.4292793879, "xmax": -8854071.4664179832, "ymax": 5428621.7471355293, "spatialReference": { "wkid": 102100 } }, "parentLayerId": null, "subLayerIds": [], "hasReports": false, "hasDataLinks": false, "fields": [ { "name": "OBJECTID", "visible": false, "dataType": "Int32", "displayName": "OBJECTID", "alias": "OBJECTID" }, { "displayName": "Monument Number", "name": "Monument", "alias": "Monument Number", "visible": true, "dataType": "String", "searchable": true }, { "name": "MonType", "visible": true, "dataType": "String", "displayName": "Monument Type", "alias": "Monument Type" }, { "name": "Agency", "visible": true, "dataType": "String", "displayName": "Agency", "alias": "Agency" }, { "name": "Easting", "visible": true, "dataType": "Double", "displayName": "Easting", "alias": "Easting" }, { "name": "Northing", "visible": true, "dataType": "Double", "displayName": "Northing", "alias": "Northing" }, { "name": "Latitude", "visible": true, "dataType": "String", "displayName": "Latitude", "alias": "Latitude" }, { "name": "Longitude", "visible": true, "dataType": "String", "displayName": "Longitude", "alias": "Longitude" }, { "name": "ScaleFactor", "visible": true, "dataType": "Double", "displayName": "Scale Factor", "alias": "Scale Factor" }, { "name": "Easting_CSRS", "visible": true, "dataType": "Double", "displayName": "Easting_CSRS", "alias": "Easting_CSRS" }, { "name": "Northing_CSRS", "visible": true, "dataType": "Double", "displayName": "Northing_CSRS", "alias": "Northing_CSRS" }, { "name": "Latitude_CSRS", "visible": true, "dataType": "String", "displayName": "Latitude_CSRS", "alias": "Latitude_CSRS" }, { "name": "Longitude_CSRS", "visible": true, "dataType": "String", "displayName": "Longitude_CSRS", "alias": "Longitude_CSRS" }, { "name": "ScaleFactor_CSRS", "visible": true, "dataType": "Double", "displayName": "ScaleFactor_CSRS", "alias": "ScaleFactor_CSRS" }, { "name": "CSRS_Version", "visible": true, "dataType": "Int16", "displayName": "CSRS_Version", "alias": "CSRS_Version" }, { "name": "HorizontalOrder", "visible": true, "dataType": "Int16", "displayName": "Horizontal Control Order", "alias": "Horizontal Control Order" }, { "name": "Elevation", "visible": true, "dataType": "Double", "displayName": "Elevation", "alias": "Elevation" }, { "name": "VerticalOrder", "visible": true, "dataType": "Int16", "displayName": "Vertical Control Order", "alias": "Vertical Control Order" }, { "name": "Description", "visible": true, "dataType": "String", "displayName": "Description", "alias": "Description" }, { "name": "Status", "visible": true, "dataType": "Int16", "displayName": "Status", "alias": "Status" }, { "name": "LastFound", "visible": true, "dataType": "DateTime", "displayName": "Last Found", "alias": "Last Found" }, { "name": "LastPrinted", "visible": true, "dataType": "DateTime", "displayName": "Last Printed", "alias": "Last Printed" }, { "name": "Notes", "visible": true, "dataType": "String", "displayName": "Notes", "alias": "Notes" }, { "name": "Actionable", "visible": true, "dataType": "Int16", "displayName": "Actionable", "alias": "Actionable" }, { "name": "Easting74", "visible": true, "dataType": "Double", "displayName": "Easting74", "alias": "Easting74" }, { "name": "Northing74", "visible": true, "dataType": "Double", "displayName": "Northing74", "alias": "Northing74" }, { "name": "ScaleFactor74", "visible": true, "dataType": "Double", "displayName": "Scale Factor74", "alias": "Scale Factor74" }, { "name": "Shape", "visible": true, "dataType": "Object", "displayName": "Shape", "alias": "Shape" }, { "name": "GlobalID", "visible": true, "dataType": "Guid", "displayName": "GlobalID", "alias": "GlobalID" }, { "name": "created_user", "visible": true, "dataType": "String", "displayName": "created_user", "alias": "created_user" }, { "name": "created_date", "visible": true, "dataType": "DateTime", "displayName": "created_date", "alias": "created_date" }, { "name": "last_edited_user", "visible": true, "dataType": "String", "displayName": "last_edited_user", "alias": "last_edited_user" }, { "name": "last_edited_date", "visible": true, "dataType": "DateTime", "displayName": "last_edited_date", "alias": "last_edited_date" } ], "featureHyperlinks": [], "layerHyperlinks": [], "arcadeExpressions": [ { "expression": "return IIf(IsEmpty($feature.Agency), \"Unknown\", DomainName($feature, 'Agency'));", "token": "AgencyDesc" }, { "expression": "return Count(Attachments($feature));", "token": "AttachCount" }, { "expression": "var a = Attachments($feature);\r\nif (Count(a) > 0) {\r\n var server = \"https://gis.maps.mississauga.ca:6443/arcgis/rest/services/Survey_Control/MapServer/2/\";\r\n var attachUrl;\r\n var result = \"<\" + \"br/><\" + \"span style='font-weight: bold; text-decoration-line: underline;'>Attachments:<\" + \"/span><\" + \"br/>\";\r\n for (var i in a) {\r\n attachUrl = server + $feature.OBJECTID + \"/attachments/\" + a[i].id;\r\n result += \"<\" + \"a href='\" + attachUrl + \"' target=_'blank'><\" + \"img width='300' height='300' align='center' src='\" + attachUrl + \"'/><\" + \"/a>\" + TextFormatting.NewLine;\r\n }\r\n result += \"<\" + \"span style='font-style: italic;'>Click to enlarge<\" + \"/span>\";\r\n return result;\r\n}", "token": "Attachments" }, { "expression": "if (!IsEmpty($feature.Description)) {\r\n return $feature.Description; //\"<\" + \"span style='text-decoration-line: underline; font-weight: bold;'>Description:<\" + \"/span> \" + $feature.Description;\r\n} else {\r\n return \"No Description Available\";\r\n}", "token": "Comments" }, { "expression": "return \"<\" + \"span style='font-size: 10px;'>To serve you better, please <\" + \"a href='mailto:IT Service Desk <\" + \"itservicedesk@mississauga.ca>?subject=About survey control monument \" + $feature.MONUMENT + \"'>contact us<\" + \"/a> with your questions or to report damage.<\" + \"/span>\";", "token": "Email" }, { "expression": "var horizontal = \"\";\r\nIf ($feature.MonType == \"CM\" || $feature.MonType == \"HCM\") {\r\n var coordinates = \"<\" + \"div><\" + \"span style='font-weight: bold;'>Latitude:<\" + \"/span> \" + Replace($feature.Latitude, \"^\", \"°\") + \"<\" + \"/div>\";\r\n coordinates += \"<\" + \"div><\" + \"span style='font-weight: bold;'>Longitude:<\" + \"/span> \" + Replace($feature.Longitude, \"^\", \"°\") + \"<\" + \"/div>\";\r\n \r\n var scale = \"<\" + \"div><\" + \"span style='font-weight: bold;'>Scale Factor:<\" + \"/span> \" + Text($feature.ScaleFactor) + \"<\" + \"/div>\"; \r\n\r\n var h_order = \"<\" + \"div><\" + \"span style='font-weight: bold;'>Horizontal Order:<\" + \"/span> \" + IIf(IsEmpty($feature.HorizontalOrder), \"N/A\", DomainName($feature, 'HorizontalOrder')) + \"<\" + \"/div>\";\r\n\r\n horizontal = coordinates + scale + h_order + \"<\" + \"br/>\";\r\n}\r\n\r\nvar vertical = \"\";\r\nIf ($feature.MonType == \"CM\" || $feature.MonType == \"BM\") {\r\n var elevation = \"<\" + \"div><\" + \"span style='font-weight: bold;'>Elevation:<\" + \"/span> \" + Text($feature.Elevation) + \" m<\" + \"/div>\";\r\n\r\n var v_order = \"<\" + \"div><\" + \"span style='font-weight: bold;'>Vertical Order:<\" + \"/span> \" + IIf(IsEmpty($feature.VerticalOrder), \"N/A\", DomainName($feature, 'VerticalOrder')) + \"<\" + \"/div>\";\r\n\r\n var datum = \"<\" + \"div><\" + \"span style='font-size: 8px;'>VERTICAL DATUM: CANADIAN GEODETIC DATUM, 1928 (NOT 1978 SOUTHERN ONTARIO READJUSTMENT<\" + \"/span><\" + \"/div>\";\r\n\r\n vertical = elevation + v_order + datum + \"<\" + \"br/>\";\r\n}\r\n\r\nreturn horizontal + vertical;", "token": "GeoData" }, { "expression": "return DomainName($feature, 'HorizontalOrder');", "token": "HOrderDesc" }, { "expression": "var last = \"<\" + \"span style='text-decoration-line: underline; font-weight: bold;'>Last Confirmed:<\" + \"/span> \";\r\n\r\nif (!IsEmpty($feature.LastFound)) {\r\n last += Text(ToUTC($feature.LastFound), \"MMMM DD, Y\");\r\n} else {\r\n last += \"Unknown\";\r\n}\r\n\r\nreturn last;", "token": "LastFoundUTC" }, { "expression": "return DomainName($feature, 'MonType');", "token": "MonDesc" }, { "expression": "var searchDist = 2000;\r\nvar searchUnit = \"m\";\r\n\r\nvar monuments = FeatureSetByName($map, \"Survey Control (Existing)\");\r\nvar monEligible = Decode($feature.MonType, \"CM\", \" And MonType = 'CM'\", \"HCM\", \" And MonType In ('HCM', 'CM')\", \"BM\", \" And MonType In ('BM', 'CM')\", \"\");\r\nvar monFilter = Filter(monuments, \"Monument <> '\" + $feature.Monument + \"' And Status = 1\" + monEligible);\r\nvar monNearby = Intersects(monFilter, Buffer($feature, searchDist, searchUnit));\r\n\r\nvar dct = {};\r\nvar monDist;\r\nvar key;\r\nvar val;\r\nfor (var mon in monNearby) {\r\n monDist = DistanceGeodetic($feature, mon, searchUnit);\r\n key = Text(monDist, \"0000.00\"); // set the key to the formatted distance, so keys are in ascending order\r\n val = \"<\" + \"li>\" + mon.MonType + \" \" + mon.Monument + \" (<\" + \"a href='https://www6.mississauga.ca/BMHCM/\" + Decode(mon.MonType, \"BM\", \"Benchmarks\", \"HorizontalControl\") + \"/\" + mon.Monument + \".pdf'>PDF<\" + \"/a>) is ~\" + Round(monDist, 0) + \" \" + searchUnit + \" away<\" + \"/li>\";\r\n // In case of identical distances, append an extra digit to the end to create a unique key\r\n for (var i = 0; i < 3; i++) {\r\n if (HasKey(dct, key)) {\r\n key += Text(i);\r\n }\r\n }\r\n dct[key] = val;\r\n}\r\n\r\nvar results = \"<\" + \"br/><\" + \"span style='font-weight: bold; text-decoration-line: underline;'>Closest Compatible Monuments:<\" + \"/span>\";\r\nvar mx = Min([Count(monNearby), 4]);\r\nif (mx > 0) {\r\n results += \"<\" + \"ol style='margin-top: 5px; margin-bottom: 0px;' type='1'>\";\r\n var i = 0;\r\n for (var key in dct) {\r\n if (i < mx) {\r\n var val = dct[key];\r\n results += val;\r\n }\r\n i++;\r\n }\r\n results += \"<\" + \"/ol>\";\r\n} else {\r\n results += \"<\" + \"br/>None within a \" + Text(searchDist, \"#,###\") + \" \" + searchUnit + \" radius.\";\r\n}\r\n\r\nreturn results;", "token": "Nearest" }, { "expression": "return $feature.Monument + IIf($feature.Status == 0 || IsEmpty($feature.Status), \"\", \" (<\" + \"a href='https://www6.mississauga.ca/BMHCM/\" + Decode($feature.MonType, \"BM\", \"Benchmarks\", \"HorizontalControl\") + \"/\" + $feature.Monument + \".pdf'>PDF<\" + \"/a>)\");", "token": "PDF" }, { "expression": "var result = \"\";\r\n\r\nif ($feature.MonType == \"CM\" || $feature.MonType == \"HCM\") {\r\n result = \"<\" + \"div><\" + \"span style='text-decoration-line: underline; font-weight: bold;'>Scale Factor:<\" + \"/span> \" + $feature.ScaleFactor + \"<\" + \"/div>\";\r\n}\r\n\r\nreturn result;", "token": "Scale" }, { "expression": "return DomainName($feature, 'VerticalOrder');", "token": "VOrderDesc" } ], "isDynamic": false, "dynamicDefinition": null, "themeSettings": [ { "themeID": "17", "visible": false }, { "themeID": "10", "visible": false }, { "themeID": "14", "visible": true, "initiallyVisible": false }, { "themeID": "6", "visible": true, "initiallyVisible": false }, { "themeID": "8", "visible": true }, { "themeID": "7", "visible": true, "initiallyVisible": false }, { "themeID": "0", "visible": false }, { "themeID": "1", "visible": false }, { "themeID": "19", "visible": true, "initiallyVisible": false }, { "themeID": "3", "visible": true, "initiallyVisible": false }, { "themeID": "5", "visible": false }, { "themeID": "18", "visible": false }, { "themeID": "16", "visible": true, "initiallyVisible": false }, { "themeID": "12", "visible": true, "initiallyVisible": false }, { "themeID": "13", "visible": true, "initiallyVisible": false }, { "themeID": "9", "visible": true, "initiallyVisible": false }, { "themeID": "15", "visible": true, "initiallyVisible": false }, { "themeID": "11", "visible": true, "initiallyVisible": false }, { "themeID": "20", "visible": true }, { "themeID": "21", "visible": false }, { "themeID": "22", "visible": true }, { "themeID": "2", "visible": true, "initiallyVisible": false } ], "tileLevelLimits": [] } ] }